WordPress Tutorial: In simple steps, going to show you how to develop WordPress 2019 child theme. This technique can be used to develop any child theme.
Step 1: Create a new folder and name it as child-theme (you can use any name)
Step 2: Create a style.css file and add this below code
/* Theme Name: Child Theme of 2019 Theme URI: https://www.bnwebdesign.com Author: Emdad Khan Description: Developing WordPress Child Theme for new WP Learner Template: twentynineteen */
Step 3: You can edit or change the in for Theme name, Theme URI, Author and description.
Step 4: Make sure the template name is “twentyninteen” (it’s a WordPress 2019 main theme folder name )
Step 5: Save it.
Step 6: Create a new file and name it functions.php inside newly created child theme folder
Step 7: Add this below code
<?php /*========================================== Loads parent and child stylesheet ===========================================*/ add_action( 'wp_enqueue_scripts', 'load_theme_stylesheet' ); function load_theme_stylesheet(){ wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } ?>
Step 8: Save it.
Step 9: Now upload the child theme folder to the WordPress theme directory.
Step 10: Go to WordPress Dashboard > Appreance > Theme. You will see the 2019 child theme is ready to activate.
That’s it. Very simple and easy.