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.

Please share:Pin on PinterestTweet about this on TwitterShare on FacebookShare on Google+Share on LinkedIn

3 thoughts on “Learn about Child Themes

  1. I didn’t know that creating a child theme would make it so that you don’t have to recreate your changes each time the template is updated. Now I know I HAVE to do this. You had asked in your most recent post what to do to make technical stuff easier to learn: do you have a post about creating a child theme with pictures of the interface, so we can see step-by-step how it is done? That would be very helpful.
    Bethany Lee recently posted…An Interview with Susan Cooper: A StoryTeller with Heart and DyslexiaMy Profile

    1. Bethany,

      I’m glad you are taking the plunge on creating a child theme. Yes, it makes it possible to do so much with your WordPress site!

      “child theme with pictures of the interface” – I’m not quite sure what you mean by the “interface” – could mean code editor, could mean the theme area of the WordPress admin, could mean FTP software. I’ll work on writing posts on these topics. The post called “How to make a child theme for WordPress: A pictorial introduction for beginners” has lots of details and some pictures, too.

      Meanwhile, feel free to ask if you have more specific questions.

Please leave a comment.

Your email address will not be published. Required fields are marked *

CommentLuv badge