At the first time this blog was used to “display” Wordpress themes that I created. And I directly edit the configuration files (such wp-config.php) to allow the visitor test-run the themes I created before they download. And to show a “demo” link in the post content, I add a plain HTML code like <a href=”?demo=true&temp=theme&style=theme”>Demo</a> to the content. Yes, it works fine, but then I realize something terrible.
After I edit a theme post and go to the blog home, the template was changed to the template that the post I edit recently. ![]()
So I decide to create a plugin to make those configuration and to make a link in the post content. And after I finished, I decide to use this blog not only to display my themes, but also the plugins.
Okay, here you are the plugin: Wordpress Theme Demo
After activated this plugin, you just need to add a specific tag that will be replaced as a link to test-run your themes in your post content. The tag is something like this:
[demo]Demo#theme#theme[/demo]
Where
- Text link is the text that will be the anchor
- Template dir is the directory where you put your template files
- Stylesheet dir is the directory where you put your stylesheet files, usually it is same with template dir
For the example, tag like this : [demo]Demo#theme#theme[/demo]will generate a link like this: Demo
Thanks to Mike Jolley for the inspiring plugin WP Download Monitor. Yes, I use that plugin too..
Total download: 5 times
Download WP Theme Demo (1.54 KB)