How to Create a Child Theme in WordPress Twenty Fifteen

By Lisa Sabin-Wilson

Like regular themes in WordPress, a child theme needs to reside in a directory inside the /wp-content/themes directory. The first step to creating a child theme is to add the directory that will hold it. For this example, connect to your hosting account via FTP and create a new directory called twentyfifteen-child inside the /wp-content/themes directory.

To register the twentyfifteen-child directory as a theme and to make it a child of the Twenty Fifteen theme, create a style.css file and add the appropriate theme headers. To do this, type the following code into your favorite code or plain-text editor (such as Notepad for the PC or TextEdit for the Mac) and save the file as style.css:

Theme Name: Twenty Fifteen Child
Description: My magnificent child theme
Author: Lisa Sabin-Wilson
Version: 1.0
Template: twentyfifteen

Typically, you can find the following headers in a WordPress theme:

  • Theme Name: The theme user sees this name in the back end of WordPress.

  • Description: This header provides the user any additional information about the theme. Currently, it only appears on the Manage Themes page (accessed by clicking the Themes link on the Appearance menu).

  • Author: This header lists one or more theme authors. Currently, it is shown only on the Manage Themes page (accessed by clicking the Themes link on the Appearance menu).

  • Version: The version number is very useful for keeping track of outdated versions of the theme. It is always a good idea to update the version number when modifying a theme.

  • Template: This header changes a theme into a child theme. The value of this header tells WordPress the directory name of the parent theme. Because your child theme uses Twenty Fifteen as the parent, your style.css needs to have a Template header with a value of Twenty Fifteen (the directory name of the Twenty Fifteen theme).

Now activate the new Twenty Fifteen Child theme as your active theme. You should see a site layout.

The Twenty Fifteen Child theme.

The Twenty Fifteen Child theme.

This new theme doesn’t look quite right. The problem is that the new child theme replaced the style.css file of the parent theme, yet the new child theme’s style.css file is empty.

You could just copy and paste the contents of the parent theme’s style.css file, but that would waste some of the potential of child themes.