easy WordPress child themes
We needed a new theme for our support site support.twentyfiveautumn.com so I thought I would do a quick write up on how simple making a child theme can be.
For this tutorial we’ll use the default WordPress theme twentyten as the parent theme.
- make a new folder and name it whatever you want, for example: My Theme
- open the parent folder and copy the file style.css to your My Theme folder
- open style.css in your favorite text editor and you’ll see this at the very top.
/* Theme Name: Twenty Ten Theme URI: http://wordpress.org/ Description: The 2010 theme for WordPress is stylish, customizable, etc... Author: the WordPress team Version: 1.2 License: GNU General Public License License URI: license.txt Tags: black, blue, white, two-columns, fixed-width, custom-header, etc... */
Change the Theme Name to the name of your theme and add a Template tag so it looks as below:
/* Theme Name: My Theme Template: twentyten Theme URI: http://wordpress.org/ Description: The 2010 theme for WordPress is stylish, customizable, etc... Author: the WordPress team Version: 1.2 License: GNU General Public License License URI: license.txt Tags: black, blue, white, two-columns, fixed-width, custom-header, etc... */
please note: the Template tag is the directory name of parent theme and is case-sensitive.
You’re done. everything else is optional. Move your new child theme to wp-content/themes directory of your website and activate it.
For more information on child themes visit the official documentation at:
http://codex.wordpress.org/Child_Themes

admin 2:43 pm on March 11, 2012 Permalink |
I guess I need to start reading my own posts. Our new theme is called P225 and it’s a child theme of P2 by Automattic. I fooled around with this for about a 1/2 hour before I could get the child theme working. Here’s why. The Theme Name: for the parent theme is P2 but the directory it is in is p2 in lowercase. Be sure your Template: tag in your child theme is the exact name of the parent theme directory. I’ll copy and paste from my original post:
please note: the Template tag is the directory name of parent theme and is case-sensitive.