A child theme is a modified version or copy of an installed WordPress theme that relies on the main or original theme appropriately named “Parent theme.” This copy or version (The child theme) contains all the parent theme’s functionalities, characteristics, and features except for the modification the user makes.
Why use a WordPress child theme?
When you install and customize a WordPress theme. Some of the customizations you made very probably may be overwritten when you update the theme.
Child themes are used to prevent this overwriting after updating the main theme, so you can keep all theme customizations while adding last updates to the parent theme.
How to create a WordPress Child Theme:
To begin creating a WordPress child theme, login into your dashboard, and on the left menu, move your mouse pointer over the Plugins option and press the Add New option on the displayed submenu (Plugins>Add New).
Important note: Before proceeding with the steps described below, make a backup of your site. You can find instructions here to save a clone of your WordPress site.
Find the keyword search field (upper arrow) on the plugins installation page and type “child theme configurator.” When the Child Theme Configurator plugin shows up, press the Install Now button, as shown in the screenshot below.
After installing the plugin, please enable it by pressing the Activate button as shown in the following image.
After enabling the plugin, open the configuration screen by moving your mouse cursor over the Tools option (upper arrow) on the left menu, and press Child Themes on the displayed submenu (Tools>Child Themes).
This plugin configuration screen divides enumerates all configuration steps. At the top of the screen, you will see the first 3 steps: Select an action, Select a Parent Theme and Analyze Parent Theme.
To begin, press the Analyze button to check if the theme can be used as a child.
After analyzing the site, if your theme can be used as a child, you will read, “This theme appears to be OK to use as the Child theme.” By scrolling down, you will see the following steps, 4 and 5, as shown below.
The fourth step allows you to define the name of your child theme; you can leave it as default.
Permits you to select the Primary Stylesheet or a separate stylesheet. Basically, the first option allows you to create a new stylesheet for the child theme, while the second option will enable you to keep the existing stylesheet (which you can modify, of course). Select any of the options you want.
The next step (6) allows you to define the stylesheet handling. It is recommended to select the first option at this step, permitting the plugin to determine the correct choices for you.
Then you can continue with steps 7 and 8, which are optional. The seventh step can be ignored, and there you can change the theme authorship, theme description, author website, etc.
Step 8 allows you to replicate all menus, widgets, and other customizations present on the parent theme. Select this if you want to copy the parent theme fully.
Then you can go to the last step (9) by pressing the Create New Child Theme button (See the arrow below).
After creating the new child theme, the plugin will show notifications on the process result, as shown below. You will see a link allowing you to see a preview of your child theme as shown in the upper arrow of the following screenshot, press it to check your child theme works properly.
If your child theme works properly, you need to activate it, replacing the parent theme. To do it, on the left dashboard menu, press Appearance and then press the Themes option as shown by the arrows in the following image (Appearance>Themes).
Pass your mouse pointer over the created new child theme to show up the Activate button and press it on the themes screen.
Now your child theme is enabled, and you can start customizing it.
As you can see in this article, understanding what a WordPress child theme is and generating it is pretty easy. All WordPress-level users can achieve it by following the instructions described above. Before creating your own child theme, make sure your theme does not include one already (You can check it at Appearance>Themes); some themes already bring a child theme. Also, make sure to do a backup of your parent theme, and keep in mind you can always restore it by activating it in the same way you activate a child theme. This is an excellent method to ensure all customization and the work you did will remain even after installing theme updates that overwrite it.
Thank you for reading this article explaining what is a WordPress child theme and how to create it. Keep following Linux Hint for additional WordPress tutorials and tips.