How to Create a Child Theme in Wordpress
Hey guys, its blitz, back again with another wordpress tutorial. Today, we're going to look at creating a child theme in wordpress. It doesn't matter which hosting platform you are using because editing the files is pretty seamless and identical on them all, with a little tweaking of course.
What is a child theme?
A child theme is a copy of the original theme which saves it in the condition when it was copied. If the creators of the theme decide to change or update it, the copy you make is left untouched.
Why do I need a child theme?
You might be asking, why do I need a child theme? To answer that question we have to understand that any work that you do using the original theme has the risk of being lost or distorted when the people behind the theme decide to update it. For this reason, its highly recommended in the web development world to create a child theme.
Steps to Create A Child Theme
First, assign a theme to your project by going to Appearance > Themes > Add Theme.
Now, select a theme that you like and install it. After installing click Activate.
This is where we get into the actual meat of the project. You have to open your wordpress project files through whichever client you use. This can be Filezilla, CPanel or File Manager.
Navigate to /wp-content/themes/. This is where your themes are stored. You may have to look around for it. I am using File Manager in my example, but the main thing is to hunt through the folders to the themes folder. As you can see, my path was through home/public_html/wp-content/themes.
Create a new folder for your child theme. It's name should be the name of the parent theme appended with child. For example, in my case, hello-elementor-child. Then make a style.css file inside your child theme folder.
In your style.css file, add the following while changing the values to reflect your project:
/* Theme Name: ParentTheme Child Theme URI: http://example.com/ Description: Child theme for ParentTheme Author: Your Name Author URI: http://example.com/ Template: parenttheme Version: 1.0.0 T ext Domain: parenttheme-child */
Under this you can add in your custom CSS. Make sure Template matches the name of the actual parent theme.
Create a functions.php file in the root of your child theme folder, so your theme can access all the styles of the parent theme. Inside your functions.php file add this code:
<?php function parenttheme_child_enqueue_styles() { wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css'); } add_action('wp_enqueue_scripts', 'parenttheme_child_enqueue_styles');
Save your changes.
Now, go to your wordpress admin area and under appearance > themes, you should find your child theme. Activate it and voila! You know how to create a child theme.
Obviously, there's a lot more that goes into customizing a theme and choosing which specific styles you want to keep and which ones you wish to exclude.
If you want to look deeper into the topic and get some info right from the source, I highly recommend wordpress's own handbook:
Welcome to the WordPress Theme Developer Handbook, your resource for learning all about the exciting world of WordPress themes. The Theme…
Till next time, guys and gals.

















