How to Make a WordPress Child Theme

WordPress is known for customization. If you love your current theme and want customization with it, you should learn How to Make a WordPress Child Theme.

Child themes, in our opinion, are a fantastic place to start for anyone who wants to customize the WordPress theme. In order to alter your existing theme’s functionality and appearance, you should customize its child theme.

What is a Child Theme

Using Child theme is the preferred method of customizing WordPress themes. In other words, a child theme inherits the features and appearance of its parent theme, as well as its functionality. There are several ways to alter it without changing the parent theme’s appearance. In addition, a parent theme can be updated without affecting your modifications.

If you make a mistake with your modifications, child themes provide a fail-safe option. In addition, a child theme’s files are distinct from their parent theme’s, making it easy to keep track of what you’ve done.

How to Make a WordPress Child Theme

Although the Child theme may be a new concept for most beginners, we will assure you that this tutorial will be easy and exclude all those complicated steps. Twenty Nineteen is used as a starting point for the instructions that follow.

These are the steps you need to follow:

  • First you need to open cPanel and click on File Manager.
  • Now navigate to public_html >> wp-content >> themes folder.
  • Here you need to create a New Folder, do enter your child theme’s name and click create.

Note: We recommend you name twentynineteen-child as the name of your folder where twentynineteen should be the name of your parent theme name.

  • Now open your newly created folder and create style.css file. Then add the following code inside it.
/* 
Theme Name: Twenty Nineteen Child 
Theme URL: http://yourdomain.com
Description: Twenty Nineteen Child 
Theme Author: Your Name
Author URL: http://yourdomain.com
Template: twentynineteen
Version: 1.0.0 
Text Domain: twentynineteen-child 
*/
  • Although the Child theme may be a new concept for most beginners, we assure you that this tutorial will be easy and exclude all those complicated steps. Twenty Nineteen is used as a starting point for the instructions that follow.
  • All values should be adjusted correspondingly, as shown in the given data. Because it tells WordPress which parent theme your child theme is based on, Template has the greatest importance of all the options. Then, click Save and Close to save your work.
  • Please create a new file titled functions.php in the same folder, but do not fill it with code from the parent theme’s file because it must stay distinct. Instead, copy and paste the code below into the blank file and save it:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
   wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>
  • Access Appearance >> Theme on your website. Your child theme will appear identical to the parent theme once it is activated.

That’s it; we hope this was easy. All the instructions are broken down into steps. Your child theme is ready.

Sum Up

Despite being so basic, the Child theme is very strong. In addition, we may alter a website without editing any essential files.

We hope this detailed guide helped you to understand How to Make a WordPress Child Theme. And for the visitor who asked us to write an article on How to Add Share Buttons on WordPress. We have a dedicated article on this.

After you create your child theme, you will consider learning how to customize it safely without disturbing the main theme. If so, do find time to comment down below and let us know about it.

If you enjoyed this post, subscribe to our WordPress video tutorials on YouTube Channel. Remember to follow us on Pinterest.

We accept any type of suggestion from the visitors because it always motivates us to improve. Feel free to comment below.

Leave a Comment