Tag Archives: Child Theme Wizard

Child Theme Wizard – Version 1.4 released

I’ve pushed a new version of my Child Theme Wizard plugin to WordPress today. While the changes are very simple, the implications of this update are rather significant for using child themes.

From time to time, best practices for how to create your child theme change. This has happened several times over the course of this plugins 5+ year life span. Often it is down to users that I get to find out about such changes.

Something similar has happened this time, when Marcin contacted me about a missing variable declaration ($parent_style), without which child themes can under certain circumstances malfunction. The old P2 theme is such a candidate. Marcin left a comment on the original release post for this plugin from 2014 and told me I was missing a line in the code that’s generated. Thank you so much for your help, I really appreciate the heads up 🙂

Now it’s in place, and I can sleep easy again. Apart form this major change, I’ve also taken the opportunity to update the link to the official WordPress documentation for Child Themes, which is in the process of migrating over to developer.wordpress.org. And while I was at it, I also made sure the plugin is now certified to run with WordPress 5.2.

Upgrade from the WordPress admin interface, take a look at the reviews on the WordPress.org, or grab a copy of the code from my GitHub repository. Pull requests are always welcome!

Upgrading existing Child Themes

If you’re previously created your child theme using my plugin, and you’d like to back-port the changes introduced in version 1.4 to your current theme, take a look at your child theme’s functions.php file. It should contain a function like the one below:

Copy the code above and replace the the function you’ve got running at the moment, and it’s like you’ve created a child theme with the current version. This is an optional step, if you feel your child theme is running fine as it is, don’t worry about it.

If you have any questions, please let me know 🙂

Child Theme Wizard – Version 1.3 released

This morning I felt like a bit of coding, and something that’s been on my to-do list for a while was to update my Child Theme Wizard plugin. It’s been making over 10.000 users happy since 2013.

The main reason for the update was to update the compatibility flag with WordPress 5.1 – it was already compatible with the latest version, it just wasn’t explicitly set. On this occasion I found a couple of other items I could improve upon:

  • updated the link to the WordPress Codex about Child Themes
  • verified compatibility with WordPress 5.1
  • updated social media links (added YouTube and Patreon, removed Google+)
  • added theme version to query, as suggested in WordPress Codex

The last item was new to me and doesn’t make a difference to how your child themes are created, however since the Codex suggests to create child themes this way, I thought I’d better follow best practices.

And one final thing I’ve streamlined was the code itself, both in the plugin and in the generated code. It’s now a bit more spaced out, improving readability and updatability (if that is in fact a word).

You can get the latest version either from GitHub, update from within WordPress, or download it from the official WordPress repository.

Child Theme Wizard – Version 1.1 released

wizard

I’ve released a new version of my popular Child Theme Wizard plugin today. Everything remains the same, except for one thing: the parent theme is no longer loaded via CSS, it’s now being loaded via PHP. Let me explain why.

When I wrote this little tool in 2014, the best practice to create a child theme was to load the parent’s style sheet via CSS. This was done with an @import statement, like this:

While this approach works just fine, this is no longer regarded as the best approach to the puzzle. That’s because the parent theme’s full path is hard coded into your child theme, and should the parent theme ever change it’s folder name, your child theme would stop working.

There’s a better way to get the same thing done by loading the parent style sheet via PHP in the functions.php file. Here’s how it’s done:

So that’s what the update does: switch from the older way of loading the parent theme to the new one. There. Keeping up with the times and all 🙂

Download Child Theme Wizard

You can download the plugin from the official WordPress Plugin repository, or take a look at the source code on GitHub. Enjoy!

Introducing Child Theme Wizard for WordPress

wizardI’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 in action
Child Theme Wizard in action

 

If all goes well
If all goes well you’ll see this

 

In case something went wrong
In case something went wrong

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.

Funky Thumbnail included
Funky Thumbnail included

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.