Block 3 is your WordPress theme

What is a WordPress Child Theme?

Sometimes you hear the words framework and child theme in relation to WordPress themes.

What are they, and what do they do?

There are two main types of programming that make up a theme. The first tells WordPress what to do, and the primary programming language is called PHP.

The second tells WordPress how to look, and it’s known as CSS.

Until recently, all were combined into one set of theme files. Combining them often causes problems, though.

In the past, if you made changes to the theme — maybe you wanted text to be a different size or color, or you added a special background, or you customized the homepage — you could lose all that hard work. Your changes would be completely wiped out when you updated your theme to a newer version. You’d have to go back and make your changes all over again.

The solution isn’t to continue running an old version of the theme, because that carries a different set of problems.

A few years ago, some smart people realized that it made a lot of sense to separate the design (CSS) as much as possible from the PHP. Here are just a few of the reasons:

  1. Easier Updates
  2. Cleaner Code
  3. Easier troubleshooting

The solution was to provide a theme framework (also known as the parent theme) and a child theme.

The Theme Framework

The framework provides the guts of the theme. Generally it’s usable out of the box as a standalone theme, but it’s bare bones.

It’s got no fancy bells and whistles, no special homepage layout, but it contains all the working parts.

You can use it all by itself to create your website, but it’ll look pretty plain. Here’s what the Genesis Framework looks like all by itself. (Genesis Framework and the other themes described below are all from StudioPress, with whom I have an affiliate relationship.)

Genesis Framework from StudioPress

The Child Theme

That’s where the child theme comes in.

At its most basic, the child theme consists of one file, called the Stylesheet. But it can be a lot fancier.

The child theme can contain instructions for setting up a homepage that looks like this. It’s the Authority Pro theme from StudioPress, and the homepage features pretty much whatever you want it to.

Authority Pro theme from StudioPress

Or how about this one? Infinity claims to be “stylish and modern,” and it is, with a hero image at the top of the homepage, and the ability to use widgets to configure a homepage in dozens of different ways. (Maybe hundreds. I haven’t done the math.)

the Infinity Pro theme is stylish and modern

Here’s another, completely different from the previous two. It’s the Author Pro theme, which I’ve reviewed previously.

Author Pro theme

Now you can make all the changes you want to the child theme, and when you update the framework your changes aren’t touched at all.

The important thing to remember when you’re using a framework and a child theme is that both must be installed. The child theme will not work without the framework.

Is having a Framework and Child Theme Absolutely Necessary?

No. One of the theme designers I recommend, Elegant Themes, hasn’t gone that route. Their themes work well, they’re stable, and they’re attractive. They’ve found a different way to handle the update issues.

Other Articles You’ll Enjoy

2 thoughts on “What is a WordPress Child Theme?”

  1. Fascinating…can you explain how Elegant Themes has solved the updating without Child Themes issue? Does this mean I can update our Chameleon theme, which I have not updated since 2.5, due to the fact that I created it with zero knowledge of child themes? I will not lose all customized fonts, menus, etc.

    1. Hi Mary,

      First of all, I would strongly encourage you to update. When you leave old themes in place you’re opening up lots of security holes.

      Check out the tutorial on how to update an Elegant Themes theme at https://wpbuildingblocks.com/how-to-update-elegant-themes-wordpress-theme.

      I don’t know how much or what kind of customization you did when you set up your site. If all your changes were in the ePanel, following the steps in the tutorial will take you through the update pretty painlessly.

      If you made changes to CSS or any of the PHP files, I hope you made records of those, because you will have to reconstruct them after you update. If you only changed CSS and not PHP, you can add your CSS changes to the new Custom CSS area of the ePanel.

      If you also changed PHP, once you’ve completed your update then use that file to create your own child theme. I believe Elegant Themes provides instructions on how to do that in the support area.

      Hope this helps!

Comments are closed.

5 Shares
Tweet4
Share1
Pin