In this tutorial I'm going to show you how to create a WordPress child theme.
Why would you want to create WordPress child themes?
That's a good question. WordPress child themes allow you to make changes to your active WordPress parent theme.
When that parent theme is updated, your changes are not overwritten because they are in the child theme.
to create child theme the first thing is to use file manager or FTP like filezilla to upload to file to your website host.
click the themes folder-create new folder name hitmag-child
Note:when you name for the child theme, must copy the theme name and add -child, like my theme is hitmag, and my child theme name is hitmag-child, and the template must the same name of your theme.
open the hitmag-child folder, create a style.css file.
copy the below code:
/*
Theme Name: hitmag child theme
Theme URI: https://mynicheaffiliatemarketing.com/
Description: Child theme for the hitmag
Author: Camille Yang
Author URI: https://mynicheaffiliatemarketing.com/
Template: hitmag
Version: 1.2.3
*/
create functions.php file
copy the cope from this link
https://developer.wordpress.org/themes/advanced-topics/child-themes/
.<?phpadd_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );function my_theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); }