Twenty Ten Child Theme Mods

Creating WordPress child themes is a slick way to make your own theme. All it takes are a few easy steps. Here’s an example using the standard Twenty Ten theme as the parent theme:

  • modify the child-stylesheet to make things look how you want
  • create child-directory for new child theme
  • add template files to child-directory, if you wish
  • upload child-directory to /wp-content/themes/
  • activate new child theme

The child-stylesheet must be saved with the name “style.css” in the child-directory. The child-stylesheet header (which has to be at the top of the sheet) must contain a few lines that identify its parent theme, like so:

You can add a line for the Theme URI: and Author URI:, if you like. Only the Theme Name: and Template: lines are required, the others are optional.

The @import rule indicates the directory of the parent theme and the location of the stylesheet. All you have to do is put in the new css rules below the import line.

That’s it!

If modifying the stylesheet doesn’t quite get all the changes you want, realize that you can add any template file to the child-directory and that will over-ride the parent file with the same name. For example, say you want to stick in a block for an advertisement right under the header image. Copy header.php and add a new <div> at the bottom of the page just below <div id=”main”> and stick the ad code in this division. Upload this new header.php into the child-directory and it will replace the one from the parent template.

Activate your new child theme and see how it looks!

Tips for Menus in WordPress Theme Development

WordPress
Image via Wikipedia

WordPress theme developers have a lot more help in 2011 compared to just a few years ago. With the publishing of the new standard themes and lots more interest in WordPress in general, there is a ton of info for you to soak up. Seek and ye shall find!

If you’re just starting to develop your own themes, get a good understanding of the Twenty Ten theme created by the WordPress team. You’ll learn a lot about how to put together your own theme by studying this standard theme that’s included when you download WordPress.

One of the advancements in WordPress 3.0 was the introduction of menus. To learn a bit about using the menus in your own theme, get a handle on how they’re used in the Twenty Ten theme. A great menu intro by Justin will start you on your way to understanding menus.

If you’re lost and don’t know where to start, look to the WordPress codex for help in getting started in developing themes for WordPress.