What is a Child Theme and Should I use a Child Theme [WordPress]

Child Theme in WordPress is easy to make!

I have received many emails or questions from my readers about “What is a child theme?” and why should you use it or why shouldn’t you use it.

First of all, I will try to explain what a child theme is, in “newbie” language, because I am definitely not a theme developer, therefore, can’t really explain in a more techie language.

A child theme is actually another theme folder which a functionality to “redesign” or “re-make-up” a “parent theme” or the original theme that you want to modify, in order to make this “Parent theme” looks a bit or a lot different than it should.

According wordpress official page, it is stated;

Making a child theme is very simple. Create a directory, put a properly formatted style.css file in it, and you have a child theme!

As you noticed, it explains, as long as you have a style.css in this child theme folder, you already have a child theme.

If you want a video tutorial, I have posted a guide and a video tutorial on how to create Twenty Eleven child theme.

In this post, I will still use Twenty Eleven theme to be an example of a parent theme.

Or for more easy way to explain, I will embed the video of that tutorial again in this post so that you can watch it right here.

However here is also a video from wordpress tv that explains the difference between a child theme and a parent theme.

Should I use a child theme?

I would say, it depends on the theme you are currently using.

If you for example, use a theme where it is not updated frequently, and you are “satisfied” enough with the appearance, then I don’t see a reason why you should create a child theme.

However if you feel like you want to redesign the color, or logo or anything, and this theme is frequently updated, then I would strongly recommend you create a child theme.

Other than that, if you want to keep the “original” theme “clean” without your codes inside, then it is also best to create a child theme.

Creating a child theme is very easy and simple, as mentioned above, only with style.css

Where is this  child theme should be located?

As many other themes, this “child” theme folder must be created inside “themes” folder.

As you know, when you install wordpress, you should have many files and folders, such as wp-admin folder, wp-content, and lastly, inside wp-content, you have plugins and themes. Inside “themes” folder, you create a child theme folder. (see below screenshot, red highlighted is the child theme, and the blue highlighted is the parent theme.)

what is a child theme

Where it should be located

Like wordpress page’s explanation, you can have only a style.css but you can also add any folders you like, for rotating header for example, or functions.php and images folder. But generally, it will load “functionality” of the parent theme or original theme.

As in the video above, I named my child theme as “MyTwentyEleven”. About this name, you can name it whatever you wish.

Let’s take a look with Twenty Eleven theme.

Inside MyTwentyEleven, as long as you create a style.css file, you will have a theme.

Then, if you let this style.css empty, it will bring much, except with the white background and unstyled site.

To call the “parent time” style you need to add a few lines with “template: parent theme” line included.

Basically, with Twenty Eleven, you need to add these codes to call the functionality and the parent theme’s style:

Theme Name: MyTwentyEleven
Theme URI: Your URL
Description: My own Twenty Eleven copy
Author: Your name
Template: twentyeleven
@import url('../twentyeleven/style.css');

By using a child theme, your own customization codes will be loaded from your server once, and then from now on, it will be saved in the user’s browser, so it won’t load from your server again, unless the cache is cleaned.

Also, since the theme is frequently updated, your customizations will stay, and won’t affect the style you implemented to redesign the parent theme.

Share the knowledge
Share on Google+0Tweet about this on TwitterShare on Facebook0Pin on Pinterest0Share on Reddit0Email this to someonePrint this page