How to install a child theme and why you need one

From WordPress official website: A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme.

Why you need a child theme

The main reason we recommend to use a child theme is to protect your changes in case you modify your main theme (the parent theme). For example, if you want to modify your parent theme to add more margin around the logo, you would need to edit the CSS file of your theme. This method is fine until we (at HookThemes) push a new update. Once you update your theme, it will overwrite all current files by new files, including the CSS file that you modified. All the changes you made will be gone. To fix this problem, WordPress created child themes.

How to install a child theme

To make a child theme works, you first need to upload the theme that you bought (parent theme). Then you will upload the corresponding child theme the same way you did for your main theme. For example, if you bought our blog theme Lisboa, you will upload Lisboa like any other theme. The next step is to download for free on our website the Lisboa Child Theme then upload it like any other theme too. At this moment, you should have two themes in your WordPress admin area themes section (and /themes/ folder on your FTP).

It should look like this:

As you can see in the screenshot above, our main theme Lisboa is activated. To use a child theme, you will need to activate it instead of the main theme. As the screenshot below.

From there, you can edit the file style.css from the child theme and this file will not be overwritten during the next update of the parent theme.

If you want to modify any other file than style.css you will need to create the file in the child theme folder with the same structure of folders. For example, you want to modify this file: /inc/functions-shortcodes.php. Notice that the PHP file is in a folder named /inc/. To modify functions-shortcodes.php, create a folder named /inc/ and a file named functions-shortcodes.php in our child theme folder.

The original path is:

/themes/lisboa/inc/functions-shortcodes.php

The new path is:

/themes/lisboa-child/inc/functions-shortcodes.php

This way, WordPress recognize that the file in the child theme is the same as the one in the parent theme and should be overwritten.