How to Preview Child Themes using the Theme Preview Plugin

I mentioned in my How to Launch Your WordPress Theme guide that you can use a plugin to let visitor previews a theme applied to your current site (so you don’t have to build your own demo theme). For the current version of wplover I’m using the Theme Preview plugin by Dougal Campbell.

The example from that plugin’s installation guide is pretty simple, you just create a link like this:
http://example.com/index.php?preview_theme=my-theme

If you use custom permalinks (I suppose everyone does it at this point, you remove the “index.php” part:
http://example.com/preview_theme=my-theme

Then, your visitors can use that link to preview that my-theme you have. Now, things get interesting when you want to demo a child theme. This doesn’t get documented clearly, but you can do this to preview child themes:
http://example.com/preview_theme=parent-theme&preview_css=child-theme

It’s that simple. Remember to use the correct names for both the parent and child theme. If you’re not sure, just use the theme’s folder name. Here’s an example for A Simple Love‘s demo:

http://wplover.com/preview_theme=thematic&preview_css=a-simple-love

Also remember that you need both the parent and child theme in your wp-content/themes/ directory for this to work.

You may also like...

css.php