A blank WordPress Theme Framework

0.3 Release

Update: I pulled this release down as it was a bit rushed. However, you can download a much stable release 0.2.3 in the meantime until I get 0.3.1 out. Thanks.

As many of you might know, version 0.3 is a major release for the project which introduces a lot of new functionality. It has been completely rewritten to pave the way for future innovations and features to come. Version 0.3 is my idea of a WordPress theme framework.

One of the main things you’ll notice about this new version is the abstraction that’s been done to all the template files. I’ve abstracted common elements from all the template files and consolidated them into callback functions. This allows for more gradual control over your layout, and keeps things DRY. Abstracting all the common elements allowed me to introduce a new concept to theme development called MVC. Model View Controller is a architectural pattern used in software engineering:

In MVC, the model represents the information (the data) of the application; the view corresponds to elements of the user interface such as text, checkbox items, and so forth; and the controller manages the communication of data and the business rules used to manipulate the data to and from the model. — Wikipedia

How does this translate to theme development? Well, think of the model as the WordPress database layer. The view translates to all WordPress template files (in which the user interacts with). And lastly, the controller is a combination of WordPress/theme functions that handle all the template logic. From an MVC perspective, current WordPress themes don’t really have a controller, everything’s just in the template files. That approach is one of the prime reasons for user modifications potentially messing up during a theme upgrade. Using a MVC approach easily solves that problem and in addition (including many other benefits), makes your theme more modular and extensible.

Introducing WP Framework Core

Ever since I released WP Framework to the public, it included some nice-to-have features along with it. Here’s whats included in version 0.3:

  • a CSS reset stylesheet
  • a basic print stylesheet
  • a base stylesheet that gives your layout a sensible default look
  • two favicons; one 16×16 .ico for the web browser and an iPhone webclip icon
  • automatically including an empty javascript file with jQuery pre-loaded
  • and semantic classes, a successor of the sandbox functions.

While these features are great, their nice-to-haves and aren’t essential for all themes. So I removed all of them and created a new package called WP Framework Core. That way if you don’t want all the extra features that WP Framework provides, you can download the core version and have only the essentials. If, however you download the core version and want to cherry pick features, that’s not a problem as all features are easily pluggable. Doing this paves the way for the theme builder project I talked about at WordCamp Miami (which I’ll explain a little more in a following article).

That’s about it, I hope you’ll enjoy this release. I covered this release at a high level, but there’s lots of new things and hidden goodies that you’ll find while playing with it. Customizing is a little different, it now mainly involves using the WordPress plugin system. I’m working on a theme based on WP Framework for you guys to play with. In the meantime, just ask any questions in the forums and I’ll be sure to help you out.

I should note that WP Framework is still considered beta software until its 1.0 release. Folders, functions and/or CSS classes might be added, removed or replaced up until 1.0, so nothing is officially permanent. This might be an inconvience for you if you start building off WP Framework right now, but the most I can do is provide you a list of detailed changes that go into each release. Alternatively, you can keep an eye on the change list, or read the readme.txt included within WP Framework to see list of all the changes between versions. I’m in the process of making a record of the change log publically, so subcribe to the blog if you haven’t already.

2 Comments to 0.3 Release

  1. Kevin's Gravatar Kevin
    March 10th, 2009 at 9:30 pm | Permalink

    Awesome.. Keep it up man.. This works perfect for everything I need to do. One question.. When can we get a .css file with the complete listing of divs and classes within the framework?

    I noticed on google code that the one you had up was outdated, and that with the release of 0.3 there were many changes (like some divs changed to classes ???)

    But a complete css of everything used within the theme would be great! one thing that the sandbox was ALWAYS lacking…

  1. By on March 10th, 2009 at 10:35 am

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Discuss WP Framework

Stop by the forums and get help with your customizations!

Forum Last 5 Discussions

WP Framework on Twitter!

Follow WP Framework and stay in the loop on WP Framework happenings!