Learn about Child Themes

What is a Child Theme?

mother leading to child

A child theme is a way to make changes to a WordPress theme without making changes to the main theme, the parent theme.

Why Create a Child Theme?

Whenever the theme is updated, if you apply the updates, all your changes will be lost. You will have to re-apply theme to the files. Instead of re-applying the changes every time there’s an update, it’s simpler to keep the changes in what’s known as a child theme.

How Do I Create a Child Theme?

You create a folder inside the themes directory and give it a name similar to the parent theme. For example, I decided to name the child theme for the theme I use for this blog, Panorama, “pandaughter.” Then, at the very least, you need to create a style.css with certain code at the top. See this post on the Codex to get the proper code for your child style.css:

Codex: Child Themes

Finally, you need to activate the child theme by going in the Admin menu to Appearance and selected your child theme from the theme choices.

Can I Do More Than Change Styles?

You can create (or re-create) any of the files in your parent theme in your child theme, such as functions.php, header.php, and sidebar.php. If it doesn’t exist in the parent theme, you can still create it in the child theme, such as category-3.php, for example. You can get quite sophisticated with your theme manipulation by unhooking functions and then recreating them in functions.php. You will find recreating the header.php will take you far in getting your header specific to your site. Then, when a theme update comes along, you won’t have to remember and redo all of your changes.

Are Some Themes Easier Parents than Others?

Certainly. You might have a very complicated theme with lots of coding, and it may be difficult to create a child easily. Conversely, some themes lend themselves to creating children. Here are a few examples:

Thematic
Twenty Ten Default Theme
Hybrid
Carrington

For more posts on child themes, visit:

Note: the mother and daughter in the illustration are from this painting by Robert Walker Mac Beth.

2 Responses to “Learn about Child Themes”

  1. That´s a very powerful feature of WordPress theme engine, with this we can stop worrying about redoing changes in the main theme between the updates.
    Thanks for pointing details about how this structure works.
    Nathan Rodriguez´s last [type] ..Netbook Dell Mini 10

  2. Rachel Ellis says:

    Another interesting feature. Since we are really into designing our catchy themes for our blogs, this feature is really a big help. Coding isn’t that complicated if you’re really determined though.

Leave a Reply

CommentLuv badge