I’ve just finished writing a new WordPress Plugin to help you create Child Themes with a single click, and no need for any external tools.
The Child Theme Wizard is a super slim assistant which can be accessed under Tools – Child Theme Wizard. Pick a Parent Theme, enter additional information, click Create Child Theme and you’re all set!
Child Theme Wizard allows you to enter the following details:
- Theme Name
- Description
- Theme URL
- Author Name
- Author URL
- Version
You can pick any existing theme that is currently installed, and you won’t be able to choose other child themes as parent themes (obviously). Child Theme Wizard will even pre-populate some of the data if it’s available from your Profile Information.
You can choose to include the GPL License to make your theme ready for Open Source Distribution. It even creates a thumbnail so you can tell your Child Theme apart from your other themes.
What does Child Theme Wizard do?
To create a Child Theme you have to
- create a directory on your server
- create a file called style.css
- paste template code and tweak it
- make sure you get your template path right
- add an empty file called functions.php
- add a screenshot.png file to make it look pretty
This usually requires an FTP client with credentials, as well as a text editor, or another web interface – in short: it’s much more tedious and time consuming than it really needs to be. Child Theme Wizard does it all conveniently from within the WordPress Admin Interface with a single click.
Why do I need to use Child Themes again?
If you make any modifications to the CSS or functionality of existing themes, and you’re tweaking core files, your changes will be overwritten if your current theme is updated with a new version.
Child Themes however isolate your changes into dedicated files. The Parent Theme can be updated safely and your tweaks remain intact.
Watch the video
In this video I’ll show you Child Theme Wizard in action:
Changelog
- v1.0 (13/03/2014) – Initial Release
Roadmap
I’d like to include the following features in future updates:
o option to support custom thumbnail uploads
o export theme option
o add translation
Download and Contribute
Child Theme Wizard is available from the WordPress.org repository. You can download it simply by searching for “child theme wizard” under Plugins – Add New and following the instructions. Or you can download it here:
You can also download and contribute to the code on GitHub:
If you have any suggestions or feature requests, please leave a comment below.
Podcast: Download (Duration: 8:18 — 7.6MB)
You’re very welcome, Mary. If you encounter any issues, please let me know.
Hi
CTW is nice tool, but I found, that you missed something like $parent_style = ‘parent-style’; in functions.php of child theme
Hi Marcin, what does that line do? Please tell me more.
It’s rather neccesary 🙂
CTW generates such a code:
function your_theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’,
get_template_directory_uri() . ‘/style.css’);
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array($parent_style),
wp_get_theme()->get(‘Version’)
);
}
and in array($parent_style) you use undefined var.
See also: wp_enqueue_style( ‘parent-style’,…
You use ‘parent-style’ here – not var
It’s bit inconsistent…