I would like to create a child theme based on the twentyeleven theme. I understand how to create my own styles.css file to work for my child theme.

I would also like to create my own custom


files. My question is what information do I need to have placed in the header of each file.

Currently the copied index.php file has:

 * The main template file.
 * @package WordPress
 * @subpackage Twenty_Eleven

Since this is my index.php file for my child theme what do I need to change?


style.css is the one and only required file in a child theme. It provides the information header by which WordPress recognizes the child theme, and it replaces the style.css of the parent.

As with any WordPress theme, the information header must be at the top of the file, the only difference being that in a child theme the Template: line is required, so that WordPress knows which theme is the parent of the child theme.

Here is an example information header of a child theme’s style.css:

Theme Name:     Twenty Eleven Child
Theme URI:      http: //example.com/
Description:    Child theme for the Twenty Eleven theme 
Author:         Your name here
Author URI:     http: //example.com/about/
Template:       twentyeleven
Version:        0.1.0

A quick explanation of each line:

  • Theme Name. (required) Child theme name.
  • Theme URI. (optional) Child theme webpage.
  • Description. (optional) What this theme is. E.g.: My first child theme. Hurrah!
  • Author URI. (optional) Author webpage.
  • Author. (optional) Author name.
  • Template. (required) directory name of parent theme, case-sensitive.
  • NOTE. You have to switch to a different theme and back to the child theme when you modify this line.
  • Version. (optional) Child theme version. E.g.: 0.1, 1.0, etc.

The part after the closing */ of the header works as a regular stylesheet file. It is where you put the styling rules you want WordPress to apply.

more details: http://codex.wordpress.org/Child_Themes

  • Thank you. I just wanted to get verification. I didn't see anything saying that you didn't need to include header info for child theme files. – TikaL13 Feb 7 '12 at 17:18
  • Template files are optional if you include it will be use otherwise it will use from parent theme – Shaon Feb 7 '12 at 19:16

You don't have to have a specific header for any child php file. It just has to be within your child theme folder. Only your child's style.css requires a specific header.


  1. Create a folder and name it anything you like. Ex: total-child
  2. Create a file titled style.css
  3. Create a file titled functions.php and paste below code to import the parent themes style.

Read More: Create Child Theme

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.