How to Create a WordPress Child Theme?

How to Create a WordPress Child Theme?

How to Create a WordPress Child Theme?

You want to make a child theme in your WordPress platform and don't know how to make the child theme in WordPress. Then follow the tutorial step, and you can get your WordPress child theme in a 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."

Step 2)

Copy files as displayed in the below image.

Step 3)

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

/*
Theme Name: Hashencrypted Child (change name as you like)
Theme URL: https://www.garudatechhub.com/ (change URL as your display)
Description: Techinternet WordPress Blog Theme (Set your description)
Author: Ravi Sukhadia (set author name here)
Author URL: https://www.garudatechhub.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 the 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 the WordPress admin section and activate your child theme.

0 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *