Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress PHP for WordPress Introduction to PHP for WordPress Editing PHP Files

I was wondering how you create the child theme folder.

I was wondering how you create the child theme folder. I found out it's done by using a specific plugin.

1 Answer

Carolina Meyer
Carolina Meyer
6,445 Points

Hi Matthijs You do not need a plugin to set up a child theme. It's actually rather straight forward. The crucial steps are:

  • creating a new theme folder as normal, with the minimum files of style.css, index,php and functions.php
  • make sure your parent theme is present in your WordPress 'themes' folder
  • Add the following code to your style.css (taking the theme Twenty Fifteen as an example)

/* Theme Name: Twenty Fifteen Child Theme URI: http://example.com/twenty-fifteen-child/ Description: Twenty Fifteen Child Theme Author: John Doe Author URI: http://example.com Template: twentyfifteen Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: twentyfifteenchild */

What is crucial here is the 'Theme Name' and 'Template'. The 'Template' tells WordPress what the parent theme is.

Here is a link for the more in depth steps: https://developer.wordpress.org/themes/advanced-topics/child-themes/

I hope this helps