What is a Child Theme in WordPress?

WordPress has something called “Child Themes” which are essentially mini themes that sit on top of a “parent” theme. The Child Themes give you a way to change the look and feel of the parent WordPress theme.

Why use a Child Theme at all?

At this point, you might be asking: “Why would I want to use a Child Theme when I can just change the code of the “parent” (or “normal”) WordPress Theme”. You might know how to hack a bit of CSS and swap in your own code here and there – enough to make it work.

Well, here’s the important part of Child Themes: They allow you to modify the look/feel of the parent theme without changing any of the parent theme’s code.

Why does it matter if I change Parent Theme’s Code?

If there’s 1 thing I’ve learned in making WordPress Themes for the last decade, it’s that code projects are NEVER done. Many things are changing on the internet every day. Whether it’s hackers finding new ways of breaking security or even just browsers updating the way they do things, the internet – and the way it displays/does things – is always changing and evolving.

This means that your WordPress Theme is likely going to need updates. When a WordPress Theme gets updated, it deletes ALL of the previous theme code and overwrites it with the updated theme code.

If you made changes to the Theme’s code, it is going to be lost when you update! This is why it is so important NOT to change the Parent (or, again, “Normal”) Theme’s code. Here is where Child Themes come in:

Child Themes let you modify your Theme without changing any of the Parent Theme’s Code.

If you want to modify the header of your theme, just copy the header.php file in your Parent Theme’s folder and paste it into your Child Theme’s folder. This will let WordPress know to ignore the header.php file in the Parent Theme folder and to use your new one in the Child Theme folder. Now, you can modify any of the code you want in the header.php file and it wont be lost if/when you update the Parent Theme! Pretty genius right? The same thing will work for ANY file you place into your child theme. So to re-cap:

If you put a file called “header.php” in your Child Theme, WordPress will use THAT file instead of the one in the Parent Theme. Make sense? I hope so! (Let me know in the comments if this is still confusing and I’ll try to clarify it further).

Child Themes are great.

I love Child Themes and the way they allow me to tweak little things here and there in my websites. As my websites grow and change, I love the power that adding a couple of code lines to my child theme gives me over the look/feel/functionality of my websites. Even with MP Stacks, I can hide specific Bricks on specific pages by adding a simple “.BODY_CLASS_HERE #mp-brick-BRICK_ID_HERE{ display:none; }” to my child theme’s css file.

This all leads me to a strange trend in WordPress that I am confused by: Buying/Selling child themes.

If you buy a Child Theme and it needs an update, it defeats the purpose of Child Themes.

If someone sells you a Child Theme, it might as well be called a Parent Theme. Child Themes are intended to be custom to you – by you. This is their purpose: to give you a way of making your theme customized.

However, if you are buying a child theme, that means other people are buying that same child theme – and that means that it will eventually need to be updated by someone who isn’t you. When they release that update, it will overwrite your customized code – and it’s no different than if you installed the Theme without a Child Theme at all.

I find this way of doing things to be very strange. It defeats to original and stated purpose of Child Themes. It goes against WordPress standards and knowingly misleads users into thinking Child Themes are something other than what they were supposed to be – a way to customize your website. This type of product-creation-behaviour is frustrating because it leads to user confusion and fragmentation within WordPress – where official WordPress things lose their meaning.

There is no such thing as a Grandchild Theme – so be careful.

At this point in time, there isn’t a way to make a Child Theme for a Child Theme (or a Grandchild Theme if you will). There won’t be a simple way for you to customize a Child Theme or replace elements you wish to change. So be careful. I recommend only buying themes that are “Parent” themes – which will allow you to create a Child Theme and customize it as you need.

Here’s a Free Theme and Child Theme for WordPress to get you started in the right direction:

If you’re looking for a great “Blank Canvas” type WordPress Theme that will allow for a lot of easy customization, check out our free theme called “Knapstack Theme“. It utilizes the MP Stacks Page building plugin. We also have a free Child Theme that goes with it and can help you get your Child Theme off the ground the right way! Download the knapstack-child-theme.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.