In this article, I just want to introduce you to the concept of WordPress Child themes and for a moment, forget about the Theme Blvd framework and making a child theme specifically for it. If you’re familiar with child themes in general and how they work, feel free to skip to the next article, Child Theme Setup.
What is a child theme?
A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. Child themes are the recommended way of modifying an existing theme.
– WordPress Codex
The concept of child theme is a very cool; WordPress really nailed that one. This can be a little confusing at first, but once it clicks, you’ll dig it.
Basically, you can designate the theme you’re using as the “parent” theme. And then, if you’d like to make customizations to that parent theme, you can create your own child theme that will run alongside of it. Your child theme will then hold all of your code customizations.
When should I use a child theme?
In short, any time you plan to make code customizations or if you think you may in the future, you should activate a child theme.
I see a lot of customers that utilize their theme’s “Custom CSS” option on their theme options page, to implement basic CSS changes. This is an easy way for people to dip their toes in the waters of code customization, without taking the big step of activating a child theme for the first time.
However, generally I see the same thing happen almost every time. It starts with a few simple CSS changes, and soon that option starts to fill up. All of a sudden, you’ve got an unorganized mess CSS on your hands. So, take that extra step, install a child theme, and organize your CSS customizations neatly within its style.css.
After all, CSS customizations are the gateway drug to becoming a WordPress developer. Don’t fight it. Just go with it.
Why should I use a child theme for customizations?
If you’re using any legitimate WordPress theme, most likely that theme will get updated over time, as any software or plugin would. So, if you edit any of your theme’s files, it’s going to be very difficult to ever update it because you’re essentially “locking” yourself in.
So instead, you should make all of your edits from a child theme. This will allow you to update your parent theme in the future and also it will help to keep your edits consolidated and organized in a single area (i.e. your child theme’s directory).
Can I make a child theme for any parent theme?
This is where things start to go awry. Technically, you can create a child theme for any WordPress theme; however the extent in which child themes are supported by a theme, or how “extendable” a theme is, is going to vary.
With most themes, you should be able to create a child theme where you’ll be able to make CSS customizations from your child theme’s style.css file and copy any main template files you want to edit to your child theme (i.e. page.php, single.php, index.php, etc).
This system works fine for many simple, free themes that you’ll find on wordpress.org. However, when a theme starts to become more complicated with a lot of functions and features that are not located in primary template files, it begins to take some extra work on the part of the theme developer to make that theme as extendable as possible.
And so this is where many “premium” themes out there tend to fall short, and something we work hard to address in Theme Blvd themes. We work really hard to make our theme framework as extendable, as possible.