A question from a reader has prompted this post. What makes a WordPress Theme Framework? I say, any WordPress theme can be a theme framework.
I’m researching Thematic and would really like some clarification on child themes. You say several places to use a child theme but I couldn’t find a list — is Junction the only one? I’m very interested in your comment that “if you’re starting with a Child Theme any WordPress theme becomes a blank framework”. But how? Could you explain a bit? Maybe a step-by-step explanation? Do you install Thematic, then the child theme, then how does “any WordPress theme” come into play? Valerie
So is it true? Yep. I’ll tell you how, why and what it means.
How To Make Any WordPress Theme A Blank Framework
Here’s how to make a Child Theme and make any WordPress theme your blank framework. Create a unique directory in your Themes folder. Let’s say it’s “supersample” for a Child Theme called “Super Sample”. Save a file to “supersample” called
style.css. Put the following at the top of your
/* Theme Name: Super Sample Theme URI: http://yourdomain.com/ Description: Testing WordPress Child Themes Author: Your Name Author URI: http://yourdomain.com/ Template: name-a-parent-theme-here Version: 1.0 */
Just like any other theme right? Sort of. Note the template parameter:
The template parameter could take anyone of the following settings (as long as the Parent Theme defined is actually in your
Now we get to my point: the template parameter turns any theme into a Parent Theme—a blank framework—when you make that Child Theme the active one. All you have to do is select that new Child Theme in the themes panel of your WordPress admin. The Child Theme is now using all the template files—header.php, index,php, sidebar.php, etc.—from the defined Parent Theme and none of the CSS of the Parent. WordPress looks for the CSS in the Child Theme directory. Try it yourself. It works right now in WordPress and let’s you modify any theme with CSS alone.
In WordPress 2.7 any template file you add to your Child Theme will override the parent template and new custom templates from the Child Theme directory will become available. This has radical implications. Right now though, you can still interact with the Parent Theme templates through functions.php in your Child Theme—but that’s a whole ‘nother story.
If you’re looking for examples of Parent-Child themes, my themes Acamas and Travailler, along with the theme you see here on ThemeShaper, and Pat Dryburgh’s Junction, are all Child Themes of Thematic. Justin Tadlock has several Child Themes available, and more coming, for his themes on Theme Hybrid. All the designs entered in the Sandbox Design Competition are Child Themes of The Sandbox.
And I think you’ll be seeing a lot more Parent Child Themes soon.
All Frameworks Are Not Created Equal
One caveat. The extent to which a blank theme framework can be a good Parent Theme depends on the support for the theme and the markup. A good theme framework needs to keep up with WordPress development. Technically, this makes the Default WordPress theme a good framework. But only technically. I don’t know if the markup really lends itself to that good use as a theme framework. Good, lean markup that lets you create hundreds of different popular layouts is rare in the WordPress theme world.
Rare too are semantic class names. No one wants to float a div named “sidebar-left” to the right of their layout. And what if you’re not going to use it as a sidebar?
What does this mean? While you can use any WordPress theme as a blank framework, not every theme makes the best blank framework. But! If all you’re looking for is a blank canvas, well, you’ve got that when you select any WordPress theme as your next theme’s Parent Theme.
More Information on WordPress Theme Frameworks
For more information check out the following posts on ThemeShaper:
- How I used a WordPress Child Theme To Redesign My Blog The Smart Way
- How To Protect Your WordPress Theme Against Upgrades
- A Revolution in Theming: WordPress Theme Frameworks