How to Create Child Theme in WordPress? If you are making major customization on your theme, better you create a child theme because if you update your theme to the latest version, all your customization will not be lost.
What is Child Theme?
A child theme is a theme act as a mirror reflection of a parent theme. Whatever you change and customize your theme, you must do it all on the child theme. So, when you update your theme to the latest version, all your changes will not be lost because update the latest version just affects the parent theme only. Not to the child theme.
Why Must You Create Child Theme During Customize?
As I am mention above, your customization will not be lost if your theme gets the latest updated version. Another reason is, it can secure your theme from getting any issue. If you get any error, just deactivate your child theme, and your site will back to normal.
Create Child Theme
In this tutorial, I will show you two methods how you can create child theme for your site. Before you start, navigate to your theme Appearance » Themes. The activated current theme is the parent theme. For example, I will use Extra Theme as a parent theme.
So, let’s get started.
Log into cPanel and navigate to wp-content » themes. Here, you must create a new folder. For example, extra-child.
Create a file titled style.css. Then, copy the code below and paste into style.css
functions.php file, then copy the code below and paste into the functions.php.Create
Log into your WordPress and navigate to Appearance » Themes. Activate your child theme. Finish.
Navigate to Appearance » Themes, make sure the parent theme is activated (Ex: If you wish to use Twenty Seventeen as your theme, then Twenty Seventeen is your parent theme).
Click on the theme thumbnail, then click on Child Theme.
After that, you will be direct to the child theme configuration page. Full fill Theme name, Description, and author field. Then click the Create Child button.
Using Child Theme Generator
If you want to create child theme faster and easier you can use theme generator by Astra.
Just insert child theme name and click on Generate button.
Congrats! Now your child theme was successfully created.
In this tutorial, you have learned how to create a child theme. Make sure you practice this when you make any customize on your theme.
If you like this article, then please FOLLOW our Linkedin, Twitter, YouTube, Pinterest, and Facebook. Do not forget to check our services page to upgrade your WordPress. If you find this post has an issue with copyright, outdated, or in error, please contact us to fix it.