Always use a child theme for WordPress theme customization. Click To Tweet

In a WordPress, You can create a child theme to extend the existing WordPress theme functionality.

Always use a Child Theme for theme customization.
If you make customization in a Parent Theme then it’ll be lost after parent theme update.

1) Quick Download

Click on Download AwesomePress child theme from GitHub.

2) Create Child Theme manually?

I’m explaining how to create a child theme for AwesomePress Theme. Child theme creation is the same process for all themes.

Step1: Create directory `awesomepress-child` in directory ‘/wp-content/themes/

Step2: Create file style.css in ‘awesomepress-child’ directory and copy & paste below code in it.

/*!
Theme Name: AwesomePress Child
Theme URI: https://github.com/surror/awesomepress
Author: Surror
Author URI: https://surror.com/
Description: AwesomePress is lightweight, responsive theme for bloggers who love to write articles, share awesome stuff etc.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: awesomepress-child
Tags: one-column, two-columns, three-columns, right-sidebar, left-sidebar, blog, custom-header, custom-background, custom-menu, custom-colors, threaded-comments, translation-ready, accessibility-ready, featured-images, theme-options, post-formats, flexible-header, editor-style, rtl-language-support
Template: awesomepress
*/

Note: From this file ‘Template: awesomepress’ and ‘Theme Name: AwesomePress Child’ is important.

Step3: Create file functions.php and add below code in it.

 wp_enqueue_style( 'awesomepress-child-css', get_stylesheet_directory_uri() . '/style.css', array( 'awesomepress-core-css' ), AWESOMEPRESS_CHILD_VERSION, 'all' );
}

add_action( 'wp_enqueue_scripts', 'awesomepress_child_theme_scripts' );

endif;

For more details visit https://codex.wordpress.org/Child_Themes


Congrats! Your child theme is created.
Goto ‘Appearance -> Themes’ and activatge ‘AwesomePress Child’ theme.

Leave a Reply

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