How To Create A Child Theme in SQUAREROOT

1.  Go to Squareroot file -> wp-content -> theme and create a new folder for your child theme. Naming it something like “squareroot-child” is common. Within your new theme folder, create two files called style.css and functions.php. 


Filling in the information of each file as below:

In Style.css file:

Theme Name: Squareroot Child
Template: squareroot
Author: DONG-IT
Version: 1.0.0
Updated: 2015-05-14 03:07:14

The most important part of this file is the “Template” which must be the same name with your parent theme. The folder of our parent theme now is “squareroot”.

You can decide yourself to write other information as you want.

In functions.php file:

if ( !defined( 'ABSPATH' ) ) exit; 
if ( !function_exists( 'thim_child_css' ) ):
    function thim_child_css() {
        wp_enqueue_style( 'thim_child', get_stylesheet_uri() ); 
add_action( 'wp_enqueue_scripts', 'thim_child_css', 999 );

3. Activating Your Child Theme by going to Appearances > Themes > Active  Squareroot- child theme.

Your child theme is now ready to use!

Take note that you may need to re-save your menu (Appearance > Menus ) and theme options (including background and header images) after activating the child theme.