Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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.
Carolina Meyer6,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