One of the most frustrating things for buyers of commercial themes is when they activate a theme on their site and it looks nothing like the theme demo. Theme demos are created to show off the theme in the best possible light so theme companies spend a long time filling it with demo content and stock images to give it the wow factor – they want to highlight as many of the theme features as possible and customers will base their buying decision on seeing the demo site and imagining how it will look with their content and branding so it can be quite disappointing when they finally purchase it and activate it on their website and they see a bland layout that looks nothing like the demo.

I have reviewed probably hundreds of themes over the years here on WPLift as well as created my own themes so I think I have a good feel for how themes are usually set up but even then I will be stumped sometimes and have to delve through documentation to find out how a particular theme is setup – there really should be a standard way of doing this but there isn’t at the moment. Some themes will rely on placing widgets to create a custom homepage, some will require certain pages to be created with shortcodes placed and others will use custom page templates and so on.

WordPress Import Demo Content

Personally when we create our themes, I include a sample data folder with an import file which will import all the content from our demo site, including images ( I will only use images which have GPL / Creative Commons license) so people can get the exact images from our demo site, some themes that use images with different licenses will include blank images in the sample data which will obivously make the theme look quite bland.

There are also custom import tools that some themes use which are for more convoluted themes which will place specific widgets, create shortcodes etc. In today’s post Im going to look at some of the options available to theme developers to try and make this process as easy as possible for the end-user.

Sample Data with WordPress Export / Import

WordPress has a built-in Export and Import system designed to help you move content from one WordPress site to another.

I believe this is the best way to allow the user to import all content from your demo site – by creating an import file you let the customer add all posts, pages, custom post type content, images, categories, tags and comments from your demo site. Once you have setup your demo site, export the data by going to “Tools” > “Export” and choose which content you want to export. If there is content from plugins you dont want includedm then deactivate them first before doing the export, otherwise the user will get an error if they dont have that plugin installed.

1

For the user to then import your data, they visit “Tools” > “Import” and will need to install the WordPress importer plugin, after which they can then upload your file to import the content.

2

Download The Plugin »

Handling Required / Recommended Plugins

A good way to add functionality to your WordPress theme is to require or recommend certain plugins, this is better than just including all the functionality into the theme itself via the functions.php file as users will not be subject to content-lock in, that is they can change themes and content will remain rather then being reliant on your theme. The best way to do this is to use the TGM Plugin Activation PHP library by Thomas Griffin.

Using this in your theme is fairly simple, you drop the class file into your theme directory and call it from functions.php then create a hook which registers the plugins and configuration. You can grab the file and see full instructions on the site here.

After activating your theme, the user will see a list of required and recommended plugins and can choose to activate the ones they want or all of them in bulk.

3

Download The Plugin »

Widget Importer & Exporter

If your theme relies on specific widgets being placed for functionality then there is a plugin called “Widget Importer & Exporter” created by Steven Gliebe which you can use to export your widget placements and content into a file with .wie extension which the customer can then use the same plugin to import them, if they are using the same theme then they will get an identical widget setup to your demo site.

To use this grab the free plugin, create your widget setup as usual and then visit “Tools” > “Widget Importer & Exporter” and export the file.

4

This is a really handy plugin – it would be nice though to see this functionality built-in to the WordPress Importer itself.

Download The Plugin »

Theme Customizer Export / Import

We don’t tend to use this in our themes as we set default options for the theme customizer which the user can then tweak to their liking but for some themes which include a lot of options here it will be useful to also offer some demo data which is where the Customizer Export / Import plugin can be used. This works the same as the WordPress Exporter and the Widget Exporter, simply choose your options and export the file.

5

Download The Plugin »

One-Click Demo Setup

Finally, for themes that require a more complex setup that use a theme options panel ( Redux Framework, NHP Options Framework or Radium Framework ) I found the Radium One-Click Demo install library.

Using this will allow you to import demo content generated using the WordPress Content Exporter plugin, widget content generated using the Widget Importer Exporter plugin. ( Rename it from .wie to .json ) and theme_options.txt – generated using the theme options frameworks such as Redux Framework, NHP Options Framework or Radium Framework and will also allow you to auto-create menus.

To use it, follow these steps :

  • Add require get_template_directory() .’/radium-one-click-demo-install/init.php’; to your theme’s function.php
  • Copy the files generated above into demo-files/.
  • Modify what menus need to be loaded in the Radium_Theme_Demo_Data_Importer class located in init.php as well as the theme options name to be used.
  • A new menu should appear under Appearance -> Import Demo Data
  • Click the import button

Download The Plugin »

Conclusion

Setting up a theme shouldn’t be a complex task for the user, If I sometimes struggle to get a demo set up with a new theme, imagine the difficulty a new user will have. By standardizing this process you can make it easier for them and also cut down on support costs associated with first time setups.

With the methods above it should be fairly easy as long as the steps are indicated clearly in documentation or a quick walk though video. The problems will arise when theme companies use propriety options panels or system that require complicated shortcodes being placed to function. Personally I hate having to place shortcodes to get a theme looking how it supposed to – a problem when certain page builders are used.

What do you think ? How do you handle theme setup for customers ?


Author:

Oliver Dale is the founder of Kooc Media, An Internet Company based in Manchester, UK. I founded WPLift and ThemeFurnace, find out more on my Personal Blog. Thanks!

Siteground Hosting
Does WPLift load fast for you? That’s because we use Siteground for hosting, WPLift readers can click here to get up to 60% off hosting for your site.

Disclosure: This page may contain affiliate links for which we will receive compensation if a purchase is made.

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Leave Yours +

9 Comments

  1. This is also so true about free themes from wordpress.org. When you look at the screenshot in the theme repository, it’s all great. When you preview the theme it is very bad as everything looks stripped of magic and sort of awkward, plus with generic boat picture and nothing else. Even fonts are kind of different.

    When you install and activate the theme you’ve got your content but it still looks so far away from that screenshot and will be far from it even after a lot of customizing and tweaking (provided theme options and customization is included and goes beyond basic header/background image).

    • Yes, I agree – It would be nice if the directory allowed you access to your theme demo so you could set it up and add your own content etc.

  2. if we install but it will need to edit a lot to be desired by us

  3. Thanks for featuring the Radium One Click Demo Install library. It is still a work in progress but am glad many developers have found a use for it since I released it.

  4. This is a very helpful article. Thank you

  5. Hi Oli

    Every developer should know these steps before launching their commercial themes. Thanks for your Step by step instructions.

  6. Dee Wan

    Thank’s for information and steps on plugins, that’s help a lot :D

  7. I wish all WordPress themes followed these steps! It’s so frustrating when you buy a theme because of the impressive theme demo, and the theme developer has made it impossible to create a website that matches the demo. I think it’s false advertising because a lot of theme authors are selling these themes based on the demo, but the demo contains sneaky things such as custom CSS which means the average user can’t replicate what they see in the demo. By definition, a theme demo should be achieveable using the features built into the theme with no extra coding.
    The Required Plugins Installer definitely makes it easier to install any plugins that come packages with the theme. However I think it’s flawed and is often mis-used, as I have seen many WordPress websites that are bloated with plugins they don’t need. At the extreme end of the scale, I have worked on WordPress websites designed by other developers where complex plugins such as bbPress and WooCommerce have been installed for no reason! I think the Required Plugins Installer should only be used for plugins that are absolutely integral to the functioning of the theme, and not for optional plugins such as WooCommerce which the theme supports but most users won’t require.

  • Comments are Closed

Our Sponsors

SEND ME FREE STUFF!

Join our Newsletter to Receive 6 Free WordPress Themes

We will also send you our weekly Newsletter packed with the Latest WordPress Content.

We will look after your email & Never Spam!

You have Successfully Subscribed!