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

Matthijs Boet
Matthijs Boet
3,791 Points

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,049 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