Child Themes for WordPress

Every heard of Child Themes? This is a very less discussed term in the WordPress Theme Development world. But this is nothing too complex. It is very similar to how to develop normal WordPress themes. So, you just have to create a folder name (such as simpleX Child) inside the themes folder and add a style.css in it. The style.css should include the following (at the least):


/*
Theme Name: simpleX Child
Theme URI: http://www.wpshoppe.com
Description: Child Theme Test for simpleX
Author: Chandra Maharzan
Author URI: http://www.wpshoppe.com
Template: simpleX
Version: 0.1
 
This work is released under the GNU General Public License (GPL), version 2:

http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

 
*/
 
@import url("../simpleX/style.css");
 
/* Overwrite your styles here */

The most important Tag here is Template. You have insert the same name as the Parent Theme otherwise it will not recognize it. Then you have import the stylesheet of the parent theme. Also note that your parent theme folder should be present inside the themes folder. :)

Once this is done (at the least), you can already see in the admin page that your child theme has been listed and you can apply that child theme as you do with normal themes. Try it, you should see the same theme as its parent. Well obviously, we haven’t added any styles to it yet. Writing CSS in child themes overwrites the CSS written in its parent theme so you can add anything you want to change and the theme automatically takes the Child Theme’s CSS.

Now, what can you do with child themes?

Well, whatever you want to. From small color combination edits to completely different looking website. The best thing is you don’t have to worry about any php. You can just place any modules anywhere and come up with your own design. Wow, isn’t that great now?!

Note from the past: You can use Template: Default tag in WordPress and overwrite the default CSS. SimpleX started in that manner but eventually went through few changes.

Photo Credit: Tina Lawson

Comments (4)

  1. Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

  2. I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.

  3. is there any complication where there will be two stylesheet. and make loading time is longer then usual.

Trackbacks/Pingbacks

  1. Themes for Wordpress 2.7: Modularity Theme Update | Graph Paper Press