Child Theme Example

Wondering why one should create WordPress Child Theme ? It is highly recommended if you’re doing ANY changes to your Theme design, including the basic style.css changes. Child Theme will look 100% the same as Responsive Theme and give you the ability to modify everything while protecting and safekeeping your changes from the future updates.

A WordPress Child Theme is a Theme that inherits the functionality of Responsive Theme also know as the parent Theme and allows you to modify, or add to, the functionality of parent theme. That is why it is recommended to create WordPress child theme.

How To Create WordPress Child Theme

Creating a child theme is very easy. You just have to create:

1. child theme directory
1.1 style.css
1.2 functions.php

Step 1: Create WordPress child theme folder

The first step is to create the child theme directory, which will be placed in wp-content/themes.

Create a new folder in this directory. Name this folder whatever you like, using a descriptive name such as “XYZtheme-child” (where “XYZtheme” is the name of your active Parent theme).

Step 2: Create WordPress child theme style.css file

Once you have created a child theme folder, add a single file in this folder, i.e., style.css.
The stylesheet must begin with the following (the stylesheet header):

Theme Name: Responsive Child Theme
Theme URI:
Description: Responsive Child Theme
Template: responsive
Version: 1.0.0
Author: CyberChimps
Author URI:
License: GNU General Public License
License URI: license.txt

Step 3: Create function.php file

Child theme needs to enqueue your parent and child theme stylesheets. To achieve the same, create function.php file. And then enqueue the parent and child theme stylesheets using WordPress script enqueue function as shown below.

add_action( ‘wp_enqueue_scripts’, ‘child_theme_enqueue_styles’ );
function child_theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );}

In case your child theme has more than one CSS file, make sure to maintain all of the Parent Theme dependencies.

While including child theme stylesheet, setting ‘parent-style’ as a dependency will ensure that the child theme stylesheet loads after it.

function child_theme_enqueue_styles() {
       $parent_style = 'parent-style'; // This is 'Responsive-style' for the Responsive theme.
       wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
       wp_enqueue_style( 'child-style',
                  get_stylesheet_directory_uri() . '/style.css',
                  array( $parent_style ),
add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_styles' );

Your child theme is now ready for activation. Log in to your site’s administration panel, and go to Administration Panels > Appearance > Themes. You should see your child theme listed and ready for activation.

To give you a head start we’ve created fully working Responsive Child Theme example for you. Please feel free to download and modify any way you like.

Child Theme needs to be either uploaded via FTP or simply over WordPress dashboard when the Theme is on your site click activate, and that’s it. When Responsive Theme is upgraded your Child Theme, and all of your modifications will be safe and remain unchanged.


Just in case that you need also see Child Themes Documentation from WordPress Codex.