1- Log into your website using FileZilla or any other FTP client, and navigate to wp-content/themes/ directory, you need to create a new folder for your child theme. You can name this folder anything you want. For this tutorial, we will be naming it novellite-child. As shown in the screenshot below.
2- Once you have created your folder, Suppose if you are creating a child theme for NovelLite then name your child theme folder as novellite-child, You need to create a style.css file inside that folder, Your stylesheet will consist of some vital information inside it. so paste the following in it using a text editor (Notepad++):
/* Theme Name: Novellite Child Theme URI: https://themehunk.com/product/novelpro-single-page-theme/ Description: Novellite Child Theme for WordPress Author: ThemeHunk Team Author URI: https://www.themehunk.com/ Template: novellite Version: 1.0.0 Text Domain: novellite-child */
Important Note- The name of the Child theme template in the style.css file, Should be the same as the name of the theme parent folder. Like my child theme template name is novellite in style.css file, and also parent folder name is novellite. You can write your child theme name and folder name as per your choice.
3- Now, we need to load the stylesheet of the parent theme. Create a file named functions.php in the child theme folder, edit it, and paste the following code:
function novelprochild_styles() { $themeVersion = wp_get_theme()->get('Version'); // Enqueue our style.css with our own version wp_enqueue_style('novelprochild-style', get_template_directory_uri() . '/style.css',array(), $themeVersion); } add_action('wp_enqueue_scripts', 'novelprochild_styles');
That’s all. You just have to save your progress and that’s it.
4- Log in to your WordPress dashboard and go to Appearance > Theme. Click the Activate button on the child theme you just created, and preview it on the front end. As shown in the screenshot below.