Wordpress Theme Demo Bar Plugin • All-in-one Solution for Theme Demo, Preview and Showcase

Post image of Wordpress Theme Demo Bar Plugin • All-in-one Solution for Theme Demo, Preview and Showcase
Posted in Featured , Wordpress Plugins on 20 April 2009 116 comments

Latest Version is 1.5.7

About

Wordpress Theme Demo Bar is a plugin for wordpress (compatible up to WP 2.8.3) that allows any wordpress theme to be previewed without activating it. A demo bar would be shown on top of page, allow users to preview another theme. The demo bar is customisable at admin panel. More than 1 extra CSS files can be loaded too.

This plugin is suitable for theme designers to show all demos of their themes in a single wordpress installation.

Info

- Compatible with Wordpress 2.8.3
- Tested on WP 2.7.1, WP 2.8, up to 2.8.3
- If you are using older versions of Wordpress, if possible, please reply here with your version (and error, if any).

Features

  • Preview any wordpress theme without activating it.
  • A demo bar will be shown on top of the page, allow users to preview another theme.
  • The demo bar can be deactivated.
  • The demo bar can be set always on top now.
  • You can load extra CSS files (more than one)
  • You can customise the look & feel of Demo Bar using CSS
  • You can hide your themes that are private.
  • Auto collection of popularity count (number of previews) of each theme.
  • Persistent preview, all internal links will be auto edited to keep the ?themedemo= variable.
  • Persistent preview can be turned off by the visitors by closing the demo bar (all links will then be reverted back automatically)
  • *NEW* Support child themes
  • *NEW* “Individual Theme Settings”, you can now display a link to theme info page and download/buy page on the demo bar
  • *NEW* You can now display theme info, such as number of previews or preview URL using shortcode
  • *NEW* To make the process easier, you can use media button to add it (see screenshot : Media Button)
  • *NEW* You can do that in template files too, using the newly added template tag function wptdb_output()
  • *NEW* Now you can edit other theme’s options (functions.php) without activating it
  • *NEW* Widget available to show “Select Theme” drop-down menu (for your visitor to preview non-private themes)
  • *NEW* New template tag function wptdb_list_themes() to display drop-down menu

Installation

  • Download the plugin package
  • Extract and upload the “wordpress-theme-demo-bar” folder to your-wordpress-directory/wp-content/plugins/
  • Activate the plugin and its ready

Usage

To preview a theme

To preview any theme, simply add a variable “themedemo” to your site URL.
For example:

http://yourwordpress.com/?themedemo=the-theme-folder-name

Alternatively, you can get the preview URL of all your themes at your Admin Panel > Settings > WP Theme Demo Bar

To hide demo bar for individual preview

Simply add a variable “hidebar” to your site URL. For example:

http://yourwordpress.com/?themedemo=mytheme&hidebar=1

To load extra css files

Simply add a variable “extracss” to your site URL and seperate using comma. For example:

http://yourwordpress.com/?themedemo=mytheme&extracss=blue,twocolumn

The URL above loads blue.css and twocolumn.css from the theme’s directory

Using Shortcodes and Template Tag Functions

Frequently Asked Questions

The Demo Bar is not showing

The theme you were previewing must be a complete theme, i.e. must have “wp_head();” and “wp_footer();” in header.php and footer.php respectively. If they were missing, you can add them yourself. Open header.php, add <?php wp_head(); ?> before </head>. Open footer.php, add <?php wp_footer(); ?> before </body>.

More FAQs »

Screenshots

Download

Wordpress Theme Demo Bar 1.5.7 - 3,915 downloads

Demo

Preview Delighted Theme | Preview Lunated Theme | Preview The Revival Theme

Change Log

Full changelog at wordpress extend

Like this plugin? Donate via Paypal

I spent a lot of time making themes and plugins. If you like this plugin and would like to support my works, you can donate via PayPal using the button below.


Plugin Support

If you have any problem with the plugin or you want to suggest a new feature, feel free to leave a comment here.

Thank you.

Posted by zen   @   20 April 2009 116 comments
Tags :


  - 116 Comments


Soprano says:

Great plugin, i’ll try it!

Thanks
.-= Soprano´s last blog ..Como criar e inserir um Favicon no seu website =-.

Lynne says:

I think this was addressed in here, but not sure I got the right answer…I think I am missing a setting somewhere.

When I click on a preview, the theme comes in perfect. But if I click on a link within the preview theme it reverts back to the parent theme. It only does this with child themes…

zen says:

@Lynne, that is a bug. Just fixed in version 1.5.2. You can auto upgrade now.

Cheers :)

Lynne says:

@Lynne,
Thanks a bunch for your quick response…just waiting for the auto upgrade to catch up…still showing 1.5.1 at the wp depository…

zen says:

@Lynne, for some reason it is not updating. I re-uploaded the files again. Check again in 15 minutes. Thanks.

Lynne says:

@Lynne, Perfect…now I can sell my themes and not have to worry about separate installs.

Just a quick note…I read in here your concerns about selling your themes. I just want to say…thanks for the free plugin…without the free development Wordpress would never be teh CMS/Blogger it is today. But when it comes to themes…we all need to make a buck in this world…if you have the skill…and you obviously do…then don’t feel bad about it.

Just my 2 cents…

samato says:

Hi!

I would like to use child menu.

ID.’&echo=0′);
if ($children) { ?>

My question is how to apply 1 theme for all child or internal links?
Sorry for my bad english.
Samato

zen says:

@samato, sorry I don’t understand and can’t see your codes.

Anyway, I created a plugin just now, you can now write source codes using [code][/code] tag.

samato says:

Sorry for my comment.
I want create a submenu that call a theme. All link load same theme. But I don’t know to where I must to paste this code:

?themedemo=wordpresstheme&amp;hidebar=1

I would like to use this code for create childmenu:


ID.'&amp;echo=0');
if ($children) { ?&gt;

Thanks again.

samato says:

@samato,
http://codex.wordpress.org/Template_Tags/wp_list_pages
List subpages even if on a subpage
I couldn’t paste the code. Sorry

zen says:

@samato, hi samato, I read your comments for 10 times but I still can’t understand.

Also, I don’t understand why did you give me the link to wp_list_pages?

Very sorry.

esmi says:

Nice plugin! Just 2 minor points – both in wp_theme_demo_bar.php.

If you place the wp-head js inside a CDATA block, it won’t invalidate pages:


// <![CDATA[
// enable the demo bar only if javascript is activated
document.write(\'\n\');
document.write(\'body { padding-'.$zv_wptdb_demobar_pos.':'.$zv_wptdb_demobar_height.'px; }\n\');
document.write(\'#wpthemedemobar { position:absolute; '.$zv_wptdb_demobar_pos.':0px !important; }\n\');
document.write(\'\n\');
// ]]>
'."\n";

A little further down, your IE conditional syntax is incorrect. Non-IE browsers won’t read !IE, so a better approach is to use:

if ($zv_wptdb_ontop) { echo '
#wpthemedemobar { position:fixed !important;}

#wpthemedemobar { position:absolute !important;}

'; }

Hope that helps.

zen says:

@esmi, thanks I will add CDATA to next version.

Regarding your second point, the line is meant to be read by all browsers except IE.

Patrick Daly says:

This plugin is just amazing! One suggestion though:

It adds (by default) 31px of padding to the BODY. A lot of themes have background images associated with the BODY tag and there’s potential for mis-aligning the design. Instead, it’d be safer to add the padding to the HTML element.

zen says:

@Patrick Daly, changed that. thanks.

esmi says:

Version 1.5.5
Your conditional IE comment syntax is invalid:

- edited by zen -

esmi says:

@esmi,
I give up! See http://quirm.net/2009/06/29/wordpress-conditional-comment-css/ for the correct syntax. As it stands, some versions of IE may not implement the conditional CSS correctly. Plus the malformed comment invalidates pages – which means I’m having to hack each new version to fix this.

zen says:

@esmi, I know what you are trying to say. But the conditional tag you give me is not what I want. I want all browser to read it except IE. I got the conditional tags from google search =x

Ok now since it doesn’t validate, I removed it and changed the style of coding.

Wait for 1.5.6

esmi says:

Not checked out the new version yet but what about adding this style to the main CSS block and then resetting it for IE via a conditional comment?

zen says:

@esmi, Yeps. That’s what I am doing.

Arne says:

Hi Zen,

thank you very much for your plugin.
I noticed that you use get_options(’siteurl’); to determine the URL of the Blog. (which one can get using get_options(’home’);)
When the blog is installed using the instructions on this site:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
siteurl and home are not the same. Therefore, your plugin does not generate the “persistent links” all over the blog.
In my example, home returns http://www.techotronic.de while siteurl returns http://www.techotronic.de/wordpress.

Could you please introduce a variable “$zv_wptdb_sitehome = get_options(’home’);” and use that in your internal link detection in lines 294 & 408 for the next version?
(Line numbers refer to version 1.5.6).

Best regards,
Arne

zen says:

@Arne, Sure I will change that. Wait for 1.5.7

Anyway, are you okay with loading css and images in plugin option page? I mean do links like below work?

http://yoursite.de/wp-content/plugins/
Arne says:

@zen, cool, thanks!
The wp-content directory is accessible using the siteurl, meaning

http://yoursite.de/wordpress/wp-content/plugins/

only “addressable content” like pages, posts, tag and category pages is accessible using home.

zen says:

@Arne, okay. I’ve uploaded the files. Now just wait for the auto upgrade :)

Adesh says:

Hi There,
First of all Thanks a ton for this Kool Theme.

Secondly, I am a far below that a Noob with PHP.
All I want to say id that as I Understand the term “Child Theme”, It means multiple css files under one theme folder.

If this is the case, Then I’d like to inform that those Options are not showing up.
I am using WP 2.8.4
If I am Right, Please advise a Fix.

zen says:

@Adesh, hi, thanks for informing but can you explain more? what options?

Thanks.

Sandesh says:

Hello zen,

I have a problem please help.I checked your plugin in localhost and the problem i am getting is- when i preview a theme using themedemo it works like a charm but as i click any category or post title to see single page it reverts back to parent theme.

Any suggestions please.

Thanks & regards

zen says:

You have to wait until the page loads completely?

Anyway, did you see a bar at the top of page?

Aris says:

“Individual Theme Settings” not working for me in 2.8.6

zen says:

Tested in 2.8.6, it works for me.

Jen says:

When editing theme options, I get this message: You do not have sufficient permissions to access this page.

zen says:

It works for me and other users. Wordpress deny you for some reason, the error message is not from my plugin.

Marco says:

First off, this is a great plugin! Thank you!

I was wondering how to view different themes with different content? For example on theme 1 I have an “About” page but on theme 2 I have an “About Me” page each with different content. How do I get it so it can preview each theme with it’s own pages, posts, etc…

Thanks!

zen says:

Just add ?themedemo=(theme-folder-name) to the URL

julien says:

This is only for change theme not for the content ?

Really useful & the best switcher around. thank you!

Is there an almost easy way to change the ‘themedemo’ parameter to something shorter like ‘demo’? I tried refactoring but it failed.

done! I’ve refactored the code again and here is the result if anyone is interested. I’ve just changed the ‘themedemo’ parameter to ‘demo’, nothing else. http://sepehr.ws/code/fork/wp-theme-demo-bar.tar.gz
thank you again ;)

Isaac says:

I downloaded the plugin posted by sepehr Lajevardi and it works well however, one change he did there where instead of:
?themedemo=(theme-folder-name) it’s:
?demo=(theme-folder-name)
But, I am having several issues:
1. the demo bar is showing only at certain themes and not showing at others
2.when I switch the theme from the demo bar it switches back to ?themedemo=(theme-folder-name) therefor receiving an error as it’s invalid url (it goes to default theme)
So I had to revert back to the original plugin from author because I am afraid that once any update will come out it will be using the ?themedemo string

Digideal says:

very good plugin, i was looking for something like this for quite some time now, i did find showcase plugins but this is something that will really help me.

Kiran Kumar says:

Very useful plugin. but must be flexible where it can show all the tmemes

Detoam says:

Great plugin. For some reason I can’t edit the properties of my themes anymore. every time I try it tells me that I don’t have sufficient priviliges. I can’t set the theme downloads or edit any links for the themes.
Any ideas?

zen says:

Sorry I do not have any idea because no one had this problem.

Very good plugin
I didn’t even thought it existed
Thanks
A lot!

chucks says:

The best of all plugins for theme demos I’ve seen. I just upgraded from wpmu 2.8 to 2.9.1.1 and the theme screenshots no longer display. Anyone having problems in regular wp?
Any ideas?
Thanks

Trace says:

Awesome plugin. Quick question, I’m trying to add a simple drop down / select box to the left of the theme preview theme button / drop down button. When I add a simple select such as test or similar, it causes the entire menu to disappear. Any tips or sample code on how we can add a simple dropdown menu? Any feedback appreciated!

Trace says:

Figured it out, was spacing issue…. too much space between lines causes menu to disappear… my bad.

Trace says:

Is it possible to not use the ?themedemo= variable and just apply the demo bar on all pages of an install?

Steve Shead says:

Hi there! I tested the plugin on my demo pages and the bar won’t show. I tested on one of my live sites and it does show, using the same themes to test.

The only difference I see between the tests is that the “demo” site is inside the main site. To make that clearer, the main site is http://www.freedom2design.com (I’ve turned the plugin off for now on that site since I know it works. The demo site is http://www.freedom2design.com/blog/ – I have left the plugin on so you can see the result – here’s a link to test: http://www.freedom2design.com/demo/?themedemo=BasicWP …you can see the space where the bar should be, but no bar. Maybe I’m doing something wrong? :)

Thanks

Steve

Steve Shead says:

…sorry …the demo site is http://www.freedom2design.com/demo …fat fingers today!

Steve

Steve Shead says:

Nevermind – saw the error of my ways …missing …sorry ’bout that! :)

julien says:

Hi Zen,

Thank for this great plugin !

Please, how i can change the content of the previewed themes with a basic structure of posts, page, links…?

Thanks

Annabel says:

Hi there,

Thanks for the excellent work. Great plugin… which i can’t get to be displayed. i checked, my theme, modularity is complete… bu no show.
Any idea as to what the problem might be? And how to fix it?
Again : thanks

Trackbacks

  1. Website Template Demos
  2. Top 1000 WordPress Plugin Authors « Metode de promovare
  3. Wordpress plugins: 17 kiểu thanh công cụ (toolbars) cho blog của bạn | Photoshop Việt Nam
  4. Wordpress Plugins : 17 Handy Toolbars For Your Blog | Afif Fattouh - Web Specialist
  5. Wordpress Plugins : 17 Handy Toolbars For Your Blog | PT Web
  6. Theme Demo Bar: plugin para exhibir temas de WordPress - elWebmaster.com
  7. Wordpress Plugins: 17 Handy Toolbars For Your Blog « qeqnes | Designing. jQuery, Ajax, PHP, MySQL and Templates
  8. Top 10 WordPress Toolbar Plugins – Create A Toolbar For Your WordPress Blog | WordPress How To Plugins, Themes Usability
  9. wp-popular.com » Blog Archive » Wordpress Theme Demo Bar Plugin • All-in-one Solution for Theme Demo, Preview and Showcase | ZENVERSE

Leave a Reply

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Please wrap all source codes with [code][/code] tags. Powered by Source Codes in Comments
Previous Post
« Creating Dynamic Sidebars (widget-ready theme) in WordPress
Next Post
Host Your Plugin at Wordpress.org using Subversion (SVN) »