How to Create a WordPress Child Theme?

wpchildtheme

You want to make a child theme in your WordPress platform and don’t know how to make the child theme in the WordPress then follow the tutorial step and you can get your WordPress child theme in few minutes. It’s a simple tutorial that can give you a better solution.

Step 1)

Make one folder in your theme folder as we make “techinternet”.

wordpresschildtheme1.png

Step 2)

Copy files as display in the below image.

wordpresschildtheme2.png

Step 3)

Open the style.css file and remove all code from that file and put the below code according to change instruction and save it.

/*
Theme Name: Hashencrypted Child (change name as you like)
Theme URL: http://hashencrypted.com/ (change URL as your display)
Description: Techinternet WordPress Blog Theme (Set your description)
Author: Ravi Sukhadia (set author name here)
Author URL: http://hashencrypted.com/ (set author URL here)
Template: twenty-twelve (set your primary theme folder name here)
Version: 1.0.0 (set theme version here)
Text Domain: Hashencrypted-child (set child theme folder name here)
*/

Step 4)

Open the functions.php file and remove all code from that file and put the below code for taking your style in child theme.

<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );

function enqueue_parent_styles() {
   wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>

Step 5)

Now your child theme is ready. go to wordpress admin section and active your child theme.

Leave a Reply

Your email address will not be published.

9  +  1  =