how to make a child theme in wordpress

  1. First, create a new folder in the "/wp-content/themes/" directory for your child theme.

  2. In the new folder, create a new file named "style.css". Add the following code at the beginning of the file:

 Theme Name:   Twenty Seventeen Child
 Theme URI:
 Description:  Twenty Seventeen Child Theme
 Author:       John Doe
 Author URI:
 Template:     twentyseventeen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-seventeen-child
  1. Create a new file named "functions.php" in the child theme directory. Add the following code to enqueue the parent theme's styles and scripts:
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
  1. Activate the child theme in the WordPress admin dashboard under "Appearance > Themes".

  2. You can now modify the child theme's files to customize the appearance and functionality without altering the parent theme.