Saturday, August 23, 2014

How to create an child theme?

In this example, we’re going to create a child theme for the Twenty Thirteen default WordPress theme.
(These steps can be done for any theme available on internet or if you create a custom them.)

1. The first thing we need to do is create a new folder in our themes directory to hold the child theme.

The themes directory is wp-content/themes for local users i.e. using wamp or xampp(You can do with using cPanel or via FTP for online sites). 

It’s important to name the folder without any space in the name, and it’s common practive to use the name of the parent theme folder with -child added on the end.

So for this example, we’ll be calling our folder “twentythirteen-child”.

2. In the child theme folder, create a file called style.css. This is the only file required to make a child theme.

The style sheet must start with the following lines:

/*
Theme Name: Twenty Thirteen Child
Theme URI: http://wordpress.org/themes/twentythirteen
Description: Twenty Thirteen Child Theme
Author: WPMU
Author URI: http://wpmu.com
Template: twentythirteen
Version: 1.0.0
*/
@import url("../twentythirteen/style.css");
/* =Theme customization starts here
-------------------------------------------------------------- */

No comments:

Post a Comment