Child themes are the best way to inherit functionalities from a parent theme, use all or some of them, and customize the child theme with other cool features, without making changes on the original “parent”. To make a child theme, here are proper guidelines:
- In the themes directory of wp-content, create a directory that has the same name as the parent directory, and extend the name with “child”, too, to differentiate between the two while using them in the future.
- Open the child directory and create a file by the name style.css, which should start with the following lines of code (which you should modify as per your theme requirements):
- To activate this theme, follow these steps:
Opt for your child theme, which will then be activated.
- Along with the style-sheets, any other file from the parent theme can be over-written by simply adding the new header file to your child file.
- While using functions.php, remember that these work different from style-sheets. Instead of over-writing the parent’s contents, it appends the child file, maintaining the previous data as well.
By adding a functions.php in your child theme, the file will not be affected by any changes made in the parent, while still doing the job it was assigned to. Through functions.php, the child theme is simply uploaded before the parent.
There are endless developments you can perform, once you get the basics.