Skip to main content

If you are about to customize your WordPress theme to something new, the first thing you would do is backup your whole WordPress site and database to make the desired changes on your theme. Instead, you can make the changes by creating a child theme in WordPress and then apply it to the Live site. This is the most effective method which you can try without any hindrance to the original site. To know how to create a Child theme on WordPress read further.

What is a Child Theme?

I am sure that you know how to install a WordPress theme, but at the same time, what is a child theme? A child theme is something that you can start from scratch or edit the existing theme without affecting or applying the changes to the parent theme. Also, If there are any changes with the parent theme, it will also be visible on the Child theme. So you can play with it as much as you want and if you are satisfied with the result then you can apply it to the Parent theme which is the actual theme using on your site.

How to Create a Child Theme in WordPress

There are two possible ways to create a child theme in WordPress and they are,

  • Create Child Theme Manually
  • Create Child Theme using a Plugin

Create Child Theme in WordPress Manually

[1] Open the FTP of your site and create a new folder for the Child Theme in wp-content/themes/(Create your Child Theme Folder here).

Note: You can name the folder anything you wish. Also, it is best to name the folder as the name of parent folder followed by -child which is much more understandable and easy to catch up anytime your need.

[2] Open the Child Theme folder and create a text file.

[3] Open the text file and enter the following line of code in it.

/*
Theme Name: Theme Name – needs to be unique to your theme
 Template – the name of the parent theme directory. The parent theme in our example is the Twenty Fifteen theme, so the Template will be twentyfifteen. You may be working with a different theme, so adjust accordingly.Twenty Fifteen Child
Theme URI: http://example.com/twenty-fifteen-child/
description: >-
Twenty Fifteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-child
*/

@import url("../twentythirteen/style.css");

Important Note:

  • Make sure the Theme Name is unique and does not resemble any of the existing theme folders on your FTP.
  • The template name should be the name of the parent theme directory. Whatever is your parent theme folder’s name, name it as it is. For example, If you are using the Twenty Fifteen theme, then the Template should be given as twentyfifteen. If you are using a different theme then make sure to name it accordingly.
  • The last line import URL is the most important one as they import stylesheet from the parent theme to the child theme. It is optional to add and if you are not interested in your parent theme then just leave it and start from scratch.
[4] Save it by File >> Save or use Ctrl + S.

[5] Enter the name of the file as style.css (Cascade Style Sheet to your site).

[6] Once the file is saved, go to your WordPress dashboard and choose Appearance from the left panel.

[7] Here you can see the newly created theme listed among the available themes.

[8] Click on Activate to activate the theme on your WordPress site.

How to Create WordPress Child Theme
[9] Now you will see no changes on the website as you have not made any changes yet. It will just replicate the parent theme if imported or shows what is available as default.

Now you can add functionalities by creating a function.php file and add all functionalities and features needed to your WordPress website. This file will make sure how your website looks, working, and behavior. This needs some basic knowledge and understanding of CSS/HTML and PHP codes. If not at least you should know how to copy and paste the code snippet to your theme. For beginners, it is better to practice with the local server for development.

Create Child Theme in WordPress with a Plugin

[1] From your WordPress Dashboard, go to Plugins and select Add New.

[2] Search and install Child Theme plugin on WordPress.

Some of the popular Child Theme WordPress Plugins are

[3] Click on Install and once installed, click on Activate to proceed further.

[4] After activation, go to Appearance section from the dashboard.

[5] Under Appearance, choose Theme and make sure the theme you need to create Child Theme is activated.

How to Create WordPress Child Theme
[6] Click on the thumbnail of the Theme you wish to create a Child Theme.

[7] Click on the Child Theme button at the bottom of the theme page to create a child theme.

[8] In the Child theme configuration page, enter the Theme name, Description, author field, etc for the Child theme.

[9] Once done, click on Child Theme to activate the theme and you are ready to proceed further.

Conclusion

Use Child theme only if you are making some massive changes on your sites like functionalities and related stuff. If the change is about the color, arrangement, or style of the site, then just use some of the common CSS editing plugins to make that happen. If you have any queries or issues on creating a child theme on WordPress let us know in the comments section below.

Leave a Reply