What is a WordPress Child Theme? Pros, Cons, and More

A lot of our users ask us which template are we using? Our response is that we are using a custom child theme built on the Genesis theme framework. The follow up question most of the time is a two-part question. What is a WordPress theme framework? The second part of the question is what is a WordPress child theme? We have already explained what is a WordPress theme framework in our previous article. In this article, we will do our best to answer questions like what is a WordPress child theme, when should you create a child theme, why do people create child themes, and lastly advantages and disadvantages of using a child theme. Our hope is that after reading this article, you will have a clear understanding of what is a WordPress child theme, and you will know whether you should use a child theme or not.

What is a WordPress Child Theme

A WordPress child theme is a WordPress theme that inherits its functionality from another WordPress theme, the parent theme. Child themes are often used when you want to customize or tweak an existing WordPress theme without losing the ability to upgrade that theme. In the past, there was no easy way of updating WordPress themes without losing all the custom styling and changes that you had made. This becomes chaos when all the sudden you find out a widely used script in popular themes has a major exploit, and you need to update your themes ASAP. It becomes a tough choice because on one hand, you would lose all the custom styles if you update. On the other hand, you risk your site getting hacked if you don’t update fast enough.

The core team and the community decided to solve this problem by introducing the concept of parent theme and child theme. A child theme in WordPress would inherit all the functionality, features, and the code of the parent theme without making any changes to the parent theme itself. This allowed users to change the styling of the parent theme and add/modify features without losing the ability to update the parent theme.

In theory, any WordPress theme can have child themes however not all WordPress themes are good parent themes. A parent theme with limited functionality and features is not exactly an ideal parent theme candidate in most cases. We will talk about the exceptions later on in the article.

A good parent theme also known as theme frameworks usually contains its own action hooks and filters. This allows designers and developers to create a robust custom WordPress site using child themes in a fraction of time.

Why do people use WordPress Child Themes?

Designers and developers use child themes to speed up their development. When using a good parent theme, you can drastically reduce the time it takes for you to create a WordPress site. All good parent themes aka theme frameworks offer tons of functionality and customization options, so you don’t have to code everything. DIY users often create child themes to tweak an existing theme without losing the ability to update the parent theme if needed.

Creating a WordPress child theme can be as simple as creating a new style.css file in a new folder. All you really need is one line in your new style.css header that defines the template (see the Codex for reference). A robust child theme can have just as many template files as the parent theme if not more. A child theme can have template files that are not even available in the parent theme.

When Should You Use a Child Theme?

The decision to use a child theme often depends on your needs. Most sites that we build for ourselves and our clients are child themes of the Genesis theme framework. In rare cases when the project is too complex or too simple, then we build it as a standalone custom WordPress theme. As WordPress developers, we need to streamline our workflow while creating quality themes. Creating a child theme of Genesis framework helps us accomplish just that.

For users we recommend child themes only if you find yourself constantly adding new functions to your theme’s functions.php file and/or constantly adding/modifying the style.css file of your theme. In these cases, we highly recommend that you use a child theme. A short while ago during our WordPress meetup talk, one of the members asked us what if you are only adding custom styles? Is it better to use a child theme or a custom CSS plugin?

The answer to that depends on how savvy and comfortable you are with technology. If you are only modifying the styles of a few elements, then using a custom CSS plugin works just fine. However, if you find yourself changing the entire color scheme, moving things around in the CSS, etc, then you definitely should consider using a child theme.

Picking a Good Parent Theme is IMPORTANT

All WordPress frameworks are parent themes, but not all parent themes are frameworks. We cannot stress this enough. While any WordPress theme can have child themes, not all of them are meant to be used as theme frameworks. We have seen numerous beginners who make the mistakes of creating a child theme of a parent theme that doesn’t offer much functionality.

If you are creating a child theme where you find yourself replacing a lot of the parent theme files, then you should rethink your process. For example you really like the Twenty Eleven theme, and you decided to create a child theme. In your child theme, you had the style.css file, and functions.php file. On top of that, you decided that you don’t like the way the footer looks, so added footer.php. Same for header, etc. If this is the case, then you shouldn’t be using Twenty Eleven as a parent theme. Rather you should be using it as a starter theme that you turn into your own custom theme.

We have had several users who created custom child themes which really should be totally independent custom themes because they had overridden almost all of the parent theme files.

In short, you should use a child theme when you need the functionality, features, and awesomeness of a powerful parent theme without writing much code for it yourself.

Advantages of Using a WordPress Child Theme

Like most things, there are advantages and disadvantages to using a WordPress Child theme. Let’s take a look at advantages first.

1. Safe Updates
A child theme automatically inherits the parent theme’s features, styles, and templates. This allows you to make changes to your site using child themes without ever modifying the parent theme. When a new version of the parent theme arrives, you can safely update it as all your modifications are saved in the child theme.

2. Easy to Extend

A child theme built on a powerful theme framework allows a great deal of flexibility without writing a lot of code. You can selectively modify only the template files and functions that you need without going through other template files. You can add new functionality and much more.

3. Fallback Safe

When you are creating a complete theme you need to think about all the possible scenarios and code for them. However, when you are working on a child theme and you forget to code for something, then there is always the parent theme’s functionality available as the fallback option.

Disadvantages of Using a Child Theme

One of the biggest disadvantage of using child themes is the time you need to invest to learn about the parent theme. There is a learning curve specially when you are working with robust frameworks because each of them have their own hooks and filters. You really have to know those to maximize the potential. In our opinion, this learning curve is a one-time thing. For example the first few child themes that you create might take you longer, but after that you will be creating custom websites in a fraction of time. Your overall performance will improve.

Another disadvantage often pointed out is that your parent theme’s developers may loose interest and abandon it, drop a feature that you were using in your child theme, or bring a change that totally destroys your child theme. This is not as bad as it sounds. Mainly because all good WordPress themes are open source and GPL. If the parent theme developer abandons the project, then nothing says that you have to stop using it. Often times, other folks in the community step up to take over the project. If the original theme developers remove a certain feature, then you can simply add it in your child theme. You have the code for it. Lastly, if they make a drastic change that you don’t like, then you can always avoid updating. Theme updates are crucial when there is a security exploit. We always recommend users to update themes because it helps ensure future compatibility with other scripts and plugins.

If you are using a commercial theme framework like Genesis, then you have support option available to help you upgrade your theme or troubleshoot problems. Also a platform like Genesis is not going to just disappear because there is a stable business organization behind it with thousands of customers world wide. For example, they removed certain built-in widgets, but they made them publicly available as plugins for those who still wanted to use it.

Conclusion

It is important to know that even though you can always create a child theme of any WordPress theme, sometimes you may not need a child theme. Think about the number of changes you have planned for your child theme, if the changes you are planning are minor, then you can always create a custom-style.css file in your theme or use a Custom CSS plugin. If the changes are too extreme where you find yourself overriding the core parent theme files, then you probably should be creating a custom theme.

We hope that this article helps you understand what is WordPress Child Theme and whether it is a good fit for you or not. If you think we missed something, then please let us know in the comments below.

A proper Theme System was introduced in WordPress 1.5 back in 2005. The earliest mention of child theme we could find was in the 2006 codex article on theme development. Hope this helps.

Kendall

I am thinking of switching my blog from a free wordpress theme to Genesis Framework + Theme. Do you have any articles about picking the right theme? Also how to create custom headers/ logos for your blog that you can easily add to your site through the Genesis Framework?

WPBeginner has done an amazing job with this child theme. I’m using genesis as well and wondering whether you have customised an existing child theme or built one from scratch on this site?

I’m not too familiar with CSS and was wondering whether you have any views on using either the Genesis Extender plugin or Dynamik Website Builder child theme – they both look to be quite user friendly but I’m not sure if the automatic ‘code’ generation will fill the site with bloat.

http://www.wpbeginner.com Editorial Staff

Hey Pratish,

We created a custom child theme from scratch

Felix Arntz

I love using child themes, I use them for almost every site I create. But you’re right, you have to find the right parent theme, I have this problem over and over again.

I think there are too many theme developers whose theme don’t really care about child themes. In my opinion, it should be a basic thing to add your own theme hooks and such. It doesn’t have to be a huge framework like Genesis, it can be a full theme on its own – but still, there will always be people who want to modify some stuff, and in my opinion, child themes are simply the best way of handling this.

Thank you for this article!
Felix

Daniel

There’s one thing I have noticed about child themes, which is the @import feature with the parent styles. (I’m not on about performance issues here either).
The “problem” being, if you have a responsive theme, with a JS media query fallback for older browsers, then it will not work on imported stylesheets, which could create a problem.

Pete

I don’t child themes, I like to get deep into the code of any theme and I feel child themes tend to hide a lot of that code from me… to me they are just another complication to customising a theme.

Andre

The interesting things about child themes, especially if one is designing and selling (or freely giving away) themes, is that It’s almost a given that every person will need to use a child theme. I’ve encountered most users of my themes (or any theme really) will be making some form of modification to a theme at some point in time…whether they get it from me or another site. I plan to go a slight different direction by exploring further, the advantages of not using a child theme.

http://www.wpbeginner.com Editorial Staff

Hey Andre,

We deal with a lot of beginners and most go without making any changes to their themes. The only changes they make is by adding additional functionality through plugins.

-Syed

Connie

I find it very strange how you define the relation between parent and child theme:

one commentline in the style.css defines that ;=(

I think you should explain that in your article …

Cheers, Connie

http://www.wpbeginner.com Editorial Staff

Had to think long and hard about whether we should add the code or not. Since this is a beginner’s guide, I decided to get rid of the code that was initially added by the author.

I just modified the line where it said that creating a child theme is as simple as adding a style.css file with a link to the codex page that can be used as a reference.

-Syed

Keith Davis

Hi Syed
I’m with you on using Genesis.
I use it now on all my own sites and all my client sites.

Like you say, you can create a child theme for any WordPress theme, but if you use a parent theme such as Genesis, you know that you can rely on the coding.

Get 25% off Gravity forms, the best form creation & management plugin for WordPress. View this Deal »

About WPBeginner

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).