Theme Switch and Preview Plugin

With this plugin you can switch to a totally different blog theme when you are logged in to your WordPress dashboard. It's great for theme development as you can tweak the templates online without breaking stuff for visitors. You can also use it for presentations, to show off various templates. I have added a widget to make this easier.

New in 0.6.0: This plugin has now three basic configurations:

  1. Only admin: This is useful for theme developers and to preview themes on live sites.
  2. Only with passkey: Send your clients preview links. They won't need an account on your blog for this to work.
  3. Everybody: Theme switching for everybody.

There is a shortcode that has two modes:

Text link cloud demo

{nkthemeswitch}

Screenshot link cloud demo

{nkthemeswitch}

Download the plugin from it's WordPress.org page.

WordPress plugin demos are disabled as I don't use WordPress on this site any more.

Published on Oct. 7, 2008 at 3:08 p.m. by Nicolas and tagged test theme, theme preview, theme switch, theme switcher, WordPress, WordPress plugin. You can follow the discussion with the comment feed for this post. Feeling generous? Donate!

219 comments

  1. avatar
    wrote this comment on

    I just found out that a similary plugin already seems to exist, see <a href="http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive/trackback/" rel="nofollow">this page</a>. Well, more choice is a good thing I guess.

  2. avatar
    wrote this comment on

    I really love this plugin, but it would even be greater if you can set a date that the theme has to change automatically.

    Thanks!

    1. avatar
      wrote this comment on

      Hm, what would you use that feature for? The plugin is only intended for logged in users, so most of your visitors wouldn't see the effect anyway.

  3. avatar
    wrote this comment on

    Hi - I would like to use this plugin however even when I activate the widget it does not get displayed in my sidebar (I am logged in as an admin). Other widgets work fine. Any idea what could be wrong?
    Thanks

    1. avatar
      wrote this comment on

      That's odd. What wordpress version do you use, do you have some sort of caching enabled? Have a look at the plugin's settings page as well, maybe "Who should see the theme switch widget" is not set? If not please report back.

      1. avatar
        wrote this comment on

        Ok got it working - deactivated and reactivated everything and it worked! I had obviously done something wrong! Thanks

        1. avatar
          wrote this comment on

          Great! :-)

  4. avatar
    wrote this comment on

    Hey nicolas.. cool plugin - cheers.. maybe you got a little answer for me.. does the plugin change parts in the database?

    1. avatar
      wrote this comment on

      Hi Romen. No, the plugin doesn't touch the database at all.

  5. avatar
    wrote this comment on

    Hey.. thanks for the cool plugin its working like clockwork!

  6. avatar
    wrote this comment on

    Hi,

    Great plugin! I want to allow all logged in users the ability to customize the site by CSS style switching. Your widget would work perfectly but unfortunately do to the design of the blog I am not permitting any widgets. What code could I add to my header for example which would allow the same functionality?

    Thanks a million!

  7. avatar
    wrote this comment on

    Hi Pete, did you read <a href="http://www.nkuttler.de//2008/10/05/use-different-css-style-for-logged-in-wordpress-users/" rel="nofollow">this post</a>? That could be modified to check which $user_ID is the current one I guess.

  8. avatar
    wrote this comment on

    Hi Nicolas,

    i'm using 2.7.1 and when I activate the plugin Worpress doesn't works. Appears an error that says something like "you do not have permision to enter this page".

    I hope you know how to solve this.

    Thank you

    1. avatar
      wrote this comment on

      That's odd. Can you paste the complete error? If you don't have enough permissions change them, your FTP client can probably do that.

  9. avatar
    wrote this comment on

    Hello,

    thanks for this plugin. I would welcome if visitors could switch the themes as well. I have a website with free WP templates and also it could deny some themes which I don't want to show because I am using WP MU platform.

    regards,

    Roman

    1. avatar
      wrote this comment on

      Roman, that's a feature I didn't want to add, but it makes sense for the kind of site you describe. I'll think about it.

  10. avatar
    wrote this comment on

    nkthemeswitch works great except for one problem: When adding a new page, the template options remain those of the active template, rather than the one I am editing using nkthemeswitch.

    Would be great if this could be fixed. Great plugin.

    Thanks

    1. avatar
      wrote this comment on

      Hi Derek, it's true that my plugin doesn't touch the admin area at all. Do you know of a free template that has options? I'd need one to test if I can implement your idea.

  11. avatar
    wrote this comment on

    Wondering if your plugin has the ability to use URLs to display a certain theme. I'd like to be able to send my clients to a URL that automatically displays the theme I've built for them. Can't figure out how to do it. I tried something like: http://www.mysite.com/demo/index.php?wptheme=Classic

    But, it doesn't work. Any help you can provide?

    Thanks!!

    John

    1. avatar
      wrote this comment on

      Good idea... maybe i can implement it this weeked... no promises though, rather busy lately.

      1. avatar
        wrote this comment on

        Hi,
        Love your theme switch and preview plugin.
        Did you ever get the chance to work on the ability to use URLs to switch themes?

        1. avatar
          wrote this comment on

          That has been working since... forever :-)

          1. avatar
            wrote this comment on

            Oops, sorry about that.
            What shoud I put in the URL?
            thx.

            1. avatar
              wrote this comment on

              You can go to the plugin settings page, there are links to all the themes you have installed at the bottom. Basically, url?theme=theme_name.

  12. avatar
    wrote this comment on

    It would be useful to be able to have multiple themes for multiple user levels.

    e.g.

    Public
    Subscribers/Members
    Editors
    Admin

    Different widgets is another complication... maybe take a look for wp2.8+ as things are changing?

    1. avatar
      wrote this comment on

      Hm, the first suggestion sounds relatively easy to do, though I'm not quite sure if I see the need for it. Care to elaborate on a usage case?

      Different widgets is probably not going to happen, that would get rather messy I think.

  13. avatar
    wrote this comment on

    I wanted to say thanks for the plugin - I actually modified it to perform a browser check instead of a user level check to display a legacy template to IE6 users. Works like a charm!

    1. avatar
      wrote this comment on

      Tucker, I like this idea. Would you mind sending me a patch? I'm sure it would be useful for other users.

  14. avatar
    wrote this comment on

    Thanks for this plug, But only registered users ? I want anyone select the template in this plugin ?

  15. avatar
    wrote this comment on

    Is there a way to get this plugin to order installed themes alphabetically in the drop-down?

    1. avatar
      wrote this comment on

      Good idea, the themes are now sorted alphabetically. Thanks for the suggestion.

  16. avatar
    wrote this comment on

    Attribute minimization is forbidden () it should say () this will help validating your code

    1. avatar
      wrote this comment on

      Vincent, I can only guess that you mean the widget markup? Yeah, if we assume that everybody uses XHTML the code wouldn't be correct. I'll think about it.

  17. avatar
    wrote this comment on

    Hi Nicolas,

    can this plugin be adapted to display a different theme depending on the page template being used? I want to display a different theme for blogposts and keep the static part of the site under a different theme.

    Thanks for a great plugin!

    1. avatar
      wrote this comment on

      Oh, and you should probably look at <a href="http://codex.wordpress.org/Template_Hierarchy" rel="nofollow">this page</a>, it sounds like what you want is already possible in WordPress without a plugin.

    2. avatar
      wrote this comment on

      Hi Peter, it's certainly possible to modify the plugin to do that. But the plugin wasn't really designed to be used for all visitors, I'd have to test lots of things if they break, like caching etc... There's a comment above by Tucker and he says his modifications work, so there's some hope.

  18. avatar
    wrote this comment on

    Hi Nicolas, Thanks for your reply!

    I did see Tucker's comment above - did he ever send a patch to you? He didn't supply a website, or a way to contact him. It sounds like his adaptation should work similar to what I'm trying to do.

    What I'm looking to do is a bit different then setting a different template inside the theme directory that looks different form the rest of the site. I want blog posts to display using a theme that resides in a different directory. That would mean being able to check to see if the page is a posts page or not and based on that activate a different theme for that page.

    Your plugin works fantastic for theme development btw, great find!

  19. avatar
    wrote this comment on

    0.5.0 Does NOT work with child themes, in the theme selection dropdown all the child themes are listed using the name of their parent theme.

    1. avatar
      wrote this comment on

      Hello DavyB, I changed the code that returns the theme name. Which parent theme do you use, I'd have to test it. Did this work in earlier releases?

  20. avatar
    wrote this comment on

    Hi,
    First of all, thank you for this handy plugin.
    As John Morris asked above, having a link to a specific theme would be a fantastic idea. Is-there a way to do that?

    Gérald

    1. avatar
      wrote this comment on

      Salut Gerald,
      that feature is already built in. Check the plugin options page to see all available switch/preview links. They are at the bottom of that page.

      1. avatar
        wrote this comment on

        This is fantastic. Thank you very much. I found it finally - saddly, this function is not clearly indicated on the admin page - as it is an important feature.

        1. avatar
          wrote this comment on

          Hm, do you have a suggestion what to change? I thought "Open theme in new window" was obvious.

  21. avatar
    wrote this comment on

    Nicolas, this is really great job.
    How to use the passkey feauture? www.domain.com/998464354984655416313ds3f318

    So after the domain goes the passkey?

    1. avatar
      wrote this comment on

      Hello Leg,

      Thanks! There are preview links on the options page in the admin area as soon as you enable the preview links. They are at the bottom of the page. I'll have to think documenting that better I guess.

  22. avatar
    wrote this comment on

    Hi Nicolas,

    I'm looking for theme switch plugin that doesn't redirect the user to the index page of the new theme but keeps them where they are.

    Is this an easy modification to your plugin? I'm a gold-certified copy-and-paster but not a php dev!

    Also being able to exclude certain themes would be brilliant - as I think Wordpress' auto upgrade adds the default and classic themes back into the theme folder if they're not present.

    Cheers, Gareth.

    1. avatar
      wrote this comment on

      Hi Gareth,

      I didn't realize the new widget does redirect to the home page, I'll fix that as soon as I can.
      Excluding themes sounds like a good idea, I will add it to the plugin.

      1. avatar
        wrote this comment on

        I am interested in excluding some themes too, is this something you are working on?

        1. avatar
          wrote this comment on

          Actually, the exclude option works now, you can get the development version of the plugin at http://downloads.wordpress.org/plugin/nkthemeswitch.zip

          I will make a formal release as soon as the translations are ready.

        2. avatar
          wrote this comment on

          I think I will add the option to exclude the default and the classic theme for the next release. I probably won't add fancy features like a selection which themes to choose from though.

  23. avatar
    wrote this comment on

    Ok - solved this myself by adding the links to new themes manually rather than via the widget (not using the _blank).

    Do these still have the rules set in the options page applied to them eg. cookie setting and expiry?

    1. avatar
      wrote this comment on

      Yes, the settings still apply.

      1. avatar
        wrote this comment on

        Thanks Nicolas - stirling effort!

  24. avatar
    wrote this comment on

    Made a new bugfix release, 0.6.1.1. Adding Status: unpublished to the header of a theme's style.css file will now exclude that theme from being shown in the theme cloud as well.

  25. avatar
    wrote this comment on

    When I click on the click on the screenshot, the Theme does not change. It just links back to my actual site.

    The URL in the address bar displays like http://domain.com/blog&amp;theme=Theme1

    1. avatar
      wrote this comment on

      Hm, can you provide a little more info? Are permalinks enabled and on which page did you have the theme cloud? It would be great if I could reproduce the problem.

  26. avatar
    wrote this comment on

    @melanie says :
    i undstand, you can open file : Plugin/inc/themeswitch
    at line :169
    $r .= '&amp;';
    Change it to : $r .= '/?';
    demo : http://www.templatelib.com/demo/?theme=WordPress+Default

    1. avatar
      wrote this comment on

      Well, that would break on the next plugin upgrade as this code won't change for now. I see it could be wrong if a blog has a static frontpage, the cloud is on that static frontpage, and the blog doesn't use permalinks. It would be great if melanie could comment.

      1. avatar
        wrote this comment on

        Replying to myself :-) Yes, this is the scenario where the bug occurs. Will release a fix later today.

  27. avatar
    wrote this comment on

    1. I'm new to wordpress
    2. I have a custom theme that worked before being modifying to wordpress - it now has been modified to wordpress
    3. the dashboard &gt; new themes &gt; upload loads the zip file but there are problems
    3. I downloaded your themeswitch plugin to see if I can identify the error but I don't know how to use the plugin -- could you possibly advise (is it typical to get such problems or is it just me?)
    Thanks

    1. avatar
      wrote this comment on

      Sorry, I have no idea what you're talking about.

  28. avatar
    wrote this comment on

    Nicolas,

    Thanks so much for this plug-in. I LOVE IT!

    I would like to comment on a small thing that I noticed with it. I use it as a WIDGET on the side panel ... not with images of screen shots ... Just the drop-down selecting tool.

    Here's the small problem I noticed. If I'm currently viewing the base URL of my website and switch to a different theme, then the plug-in makes the theme switch alright, but it throws me at a particular article only location ... it doesn't make the switch at the base URL that I was at before the switch.

    I also noticed that if I'm viewing a specific category and use the plug-in to switch the theme, then it again will switch themes, but leaves me at a randomly selected article ... not viewing the category I was at when I made the switch.

    For me, this is only a small annoyance, and I still LOVE THIS PLUG-IN. I'm also only 3 months into WordPress as well and love it as well. But it would be great if I could have the plug-in make the switch and be viewing exactly the same content afterwards as before!

    I have not tinkered with any of the code for Theme Switch ... but have done extensive customization in other places. Let me know if it's possible that this may be on my side and not occurring with anyone else. I also have Elegant Box as my default theme ... which itself has several optional styles that are selectable ... could it be possible that this is interfering with the Theme Switch Plug-in not matching the exact URL during it's use?

    I certainly do not want to you to spend an enormous time on this ... it's not THAT important to me ... hopefully this might be a quick fix. :)

    thanks again for the time and energy spent contributing this plug-in to the community,

    best regards,

    1. avatar
      wrote this comment on

      Finally found a few minutes, I'm uploading the fix right now. Thanks for reporting this Richard!

      1. avatar
        wrote this comment on

        Hi Nicolas,

        Thanks so much for your efforts; however, the fix does not seem to be working for my site.

        Is Version 0.6.1.3 the latest version?

        I tried a clean install by deleting the plugin and re-installing using the WordPress automatic install wizard.

        I have settings set for allowing anyone to switch the theme. Still, the main problem is that if you are at the BASE URL of RichImages.net and perform a switch theme request, then you will be thrown to a particular article ( looks to be the oldest article for the current month ).

        Again, if this is an easy fix, greatly appreciated. If not, then it can be placed very low on my priorities.

        best regards,

        Richard

        1. avatar
          wrote this comment on

          Oops. It looks like I made the release without including the bugfix, sorry about that. 0.6.1.4 should fix that, uploading right now.

    2. avatar
      wrote this comment on

      Hi Richard, thanks for the report. I'll look into this ASAP!

  29. avatar
    wrote this comment on

    Thanks ... works great ( hate to run you through version numbers :) )

    Base URL works perfect through a switch, ... so does viewing an individual article; Switching will from the base URL or a particular article will maintain consistency after the switch.

    ( Testing Feedback: Viewing or and switching themes throws you at some particular post ... but I doubt 95% of viewers will ever notice this, as they probably switch themes some time before selecting a category or monthly archive! )

    Thanks for the updated version!

    1. avatar
      wrote this comment on

      Oh right. This is because wp thinks it's on the page that shows the first article when you're on any list page. This is quite annoying. It's fixed now, hopefully for good :-) Thanks for reporting it!

      By the way, both fixes were basically one-liners, so no worries :-D

      1. avatar
        wrote this comment on

        Thanks ... works Great!!!!

        This is quite an improvement for those that make this plug-in available to all viewers for their personal preference!

        Glad both were one-line fixes as well!

  30. avatar
    wrote this comment on

    Hi, thanks for great plugin. It helps me many times.
    I've made Ukrainian translation - http://wordpress.co.ua/download/plugins/theme_switc_uk_translations.zip

    Thanks again!

    1. avatar
      wrote this comment on

      Hi AzzePis, this is great, thanks a lot! I will include your translation in the next release.

  31. avatar
    wrote this comment on

    Hi Nicolas - Okay, here's a weird one. I installed your plugin (0.6.1.5) into my personal blog (running 2.9.1) and it activated okay and switched between my installed themes without a problem. However...(isn't there always a however?)

    When it's activated and I attempt to add a new theme via "Themes/Add New" and click "Install" on any theme I wish to try, it opens up the install pop-up box for "Nice Wee Theme" only rather than the theme I want to install (yup, "Nice Wee Theme" is listed in the WP themes directory, BTW).

    To clarify, when "Theme Switch and Preview" plugin is activated, no matter what new theme I try to install via 2.9.1's add new theme function, it always pops up the install dialog box for "Nice Wee Theme" without exception.

    Note: I can't actually install "Nice Wee Theme" though as hitting the Install button takes me to a "Are you sure you want to do this" page with a "Try again" link that takes me back to the same page.

    Disabling the plugin via it's options doesn't solve the problem but deactivating it returns everything to normal and I can add new themes as usual.

    Just to make sure I installed 0.6.1.5 on an online test site also running 2.9.1 and had the same results. All my error logs are clear so no info there.

    Any ideas?

    1. avatar
      wrote this comment on

      Hi Kirk, not really, but thanks for the detailed report. I'll try to reproduce the problem.

  32. avatar
    wrote this comment on

    Hi Nicolas,

    Just upgraded to the latest and am having the following problem:

    I have no widget to drag to the sidebar to allow users to switch themes.

    Thanks,

    1. avatar
      wrote this comment on

      Wow, thanks for the report. I wonder how I could miss that... uploading the fix right now.

      1. avatar
        wrote this comment on

        Nicolas,

        Thanks for the speedy fix! Your dedication speaks volumes!

        best regards, sir,

  33. avatar
    wrote this comment on

    Hi Nicolas,thanks for your contribution.
    Do you know a french traduction of this plugin ?

    1. avatar
      wrote this comment on

      Salut! Sorry, I think I missed your comment earlier. There is a tool called poedit www.poedit.net that you can use to translate the plugin. If you send me your translation I'll include it.

  34. avatar
    wrote this comment on

    Hi great plugin. Glad to find it!

    Totally newbie question with this, but can something like this plugin be used to develop not only a different theme (ie look and feel) but a completely different site with new content, areas etc?

    In other words, I have a very basic default theme currently live that amounts to a basic information page and that a new site is coming. Using your plugin, can I be developing this new theme with a new look and feel as well as all new pages, areas, page templates. In other words I want to hide the new content as well as the theme. Is that possible with this plugin? Or will I have to make pages/posts active/inactive as I go through development in conjunction with the theme switcher plugin?

    Sorry for such a basic question, but trying something I haven't done before and hoping this plugin can help. Many thanks for any help!

    1. avatar
      wrote this comment on

      Hi. Hmmmmm. There are various ways of doing what you describe. The easiest would be to hide new pages/posts as you say.
      I would probably make a second WordPress install, create the new site there, and then move it to the live site.
      The WordPress 3.0 release will make all of this much easier, as you will be able to have multiple blogs in one install. I think it's scheduled for release in march.

  35. avatar
    wrote this comment on

    I am trying to add this great plugin to my tabs on my homepage. I have to call it, but I don't have any clue how.

    [nkthemeswitch] doesn't work. It has to be php. What code can I use?

    Thanks
    Okoth

    1. avatar
      wrote this comment on

      I think calling nkthemeswitch_shortcode() should work.

  36. avatar
    wrote this comment on

    just to report that problem described by Kirk M reproduces very well on all my 2.9.1 WP and latest plugin installs... theme offered for Install is different, though :-)

    1. avatar
      wrote this comment on

      Yeah, didn't have the time yet to look into it, sorry about that.

  37. avatar
    wrote this comment on

    Hi Nicolas:

    Ran into a potential small bug ... I'm using WP 2.9.2

    When I try and install a new theme using the internal WP auto install, Wordpress always gives me the very 1st theme "vermilion" no matter what I chose.

    As soon as I deactivate "Theme Switch &amp; Preview" everything works fine

    1. avatar
      wrote this comment on

      Hmmm, installing new themes doesn't work for me at all, with or without my plugin. No idea, I'll need to look into this.

      1. avatar
        wrote this comment on

        I think I had to shut down my browser, clear it's cache after deactivation your plugin - then new themes download and install worked.

  38. avatar
    wrote this comment on

    Hello,

    I'm trying to use this plugin with little luck. Every time I go here:

    http://www.iansherr.com/clips/?theme=default

    To preview/switch to WordPress Default 1.6 with little luck.

    My WordPress installation lives in iansherr.com/clips

    Any idea what might be happening? I have SuperCache turned off, and your plugin settings set for everyone.

    Any ideas on what to do?

    Thanks.

    1. avatar
      wrote this comment on

      Hi Ian,

      there are theme switch links on the settings page of the plugin. Do they work?

      1. avatar
        wrote this comment on

        Hello Nicolas,

        Thanks for your speedy reply. The answer is unfortunately no.

        I have "exclude default themes" disabled. Yet, buttons such as

        http://www.iansherr.com/clips?theme=WordPress+Classic

        I tried different permutations of that just to see if perhaps there was a weird bug. So, I tried:

        http://www.iansherr.com/clips?theme=WordPress_Classic

        and

        http://www.iansherr.com/clips/?theme=WordPress+Classic

        and

        http://www.iansherr.com/clips/?theme=WordPress_Classic

        do not work either.

        I tried another theme switch link off the plugin page as well:

        http://www.iansherr.com/clips?theme=jQ

        which also does not work.

        I've also tried activating a different theme and then trying the theme switch links again with no success.

        So, I know it's not any customization I did with the theme.

      2. avatar
        wrote this comment on

        Hello again Nicolas,

        I found the problem. I'd set the cookie expire for 999999 seconds. When I brought it down to a more reasonable time, like 2 hours, it suddenly worked.

        Thanks for your help and cheers.

        - ian

      3. avatar
        wrote this comment on

        Hi Ian, I think the initial value might have been too high for browsers to handle it properly. I'll check the specs and do some validation. IIRC a value of 0 means forever, not sure though.

  39. avatar
    wrote this comment on

    Hi Nicolas,
    I really admire your work but I have a problem with the plugin I am using wp 2.9.2 and the switching works ok while I am logged as admin and just I choose the theme I want from the drop down menu it changes but if I am not logged in when I choose a theme the page refreshes quickly and nothing happens I have to reload the page manual in order to theme changes .
    please Nicolas could you help me fast cause really need it to work.
    thanks for you time

    1. avatar
      wrote this comment on

      That's odd, can you post a link to your site?

  40. avatar
    wrote this comment on

    Nic, I found something weird.
    I got 2 themes.
    When I set theme A as default, the plugin works well. But if I set theme B as default, no matter admin or user with passkey the page always redirect to theme B, no more theme A

  41. avatar
    wrote this comment on

    Thanks Nicolas, but the redirect happens only when I am logged in but if a visitor it does what you sow.

  42. avatar
    wrote this comment on

    This is a very good plugin. But there's one problem: it isn't compatible with WP's theme editor, it gives error when I try to save the edited theme files. I have to deactivate the Theme Switch plugin, then the theme editor works, and reactivate the plugin.

    I hope that you can fix this in the next version!

    1. avatar
      wrote this comment on

      Hi Lizzy, yes, this is at the top of my todo list. I hope to be able to fix this soon.

  43. avatar
    wrote this comment on

    Hello, can you tell me how to display the mode screenshot in a template? I tried but it doesn't work. Thank you, Martina.

    1. avatar
      wrote this comment on

      Hi Martina, the shortcode to do that is [nkthemeswitch mode=screenshot]

  44. avatar
    wrote this comment on

    Thanks, Nicolas,
    I'd like to show it in the footer.php, not on a page or post, is that possible somehow?
    (wordpress took my code out of the last comment, I used: nkthemeswitch_shortcode( 'mode=screenshot' )

    1. avatar
      wrote this comment on

      <code>
      $option = get_option( 'nkthemeswitch' );
      $cloud = nkthemeswitch_cloud( $option, '', false, false, true );
      </code>

      should do the trick I guess. If not have a look at the nkthemeswitch_shortcode function.

  45. avatar
    wrote this comment on

    Thank you so much, that works like charm!

  46. avatar
    wrote this comment on

    themeswitch makes problems in wp 2.9 :( i can't edit themes in admin-panel. maybe global var $dir is used?!

    relativ:
    /themes//.php

    absolut:
    /usr/www/users//blog/wp-content/themes//.php

  47. avatar
    wrote this comment on

    Have just installed this great plugin on www.mywordpress.co.uk .

    When using the widget there is no widget title .No settings in the admin area or in the widget admin.

    Any help would be appreciated

    1. avatar
      wrote this comment on

      I'm just uploading a new release that allows to set a widget title. Thanks for the suggestion!

    2. avatar
      wrote this comment on

      That's right, there is no title yet. Will be added in the next release. For now, you could simply put a text widget above the switch widget.

  48. avatar
    wrote this comment on

    With this plugin, can you change around the css styling without visitors seeing the changes?

    1. avatar
      wrote this comment on

      Well, you'd need to create a copy of your theme first. So, not out of the box.

  49. avatar
    wrote this comment on

    Hoping you fix that Edit Themes glitch soon!

    Thanks for a great Wordpress plug-in.

    1. avatar
      wrote this comment on

      I've just made a release that should fix this issue. I hope it works for everybody.

  50. avatar
    wrote this comment on

    Hi

    Have just upgraded to Version 0.7.3.1 .I see now that the default themes are now excluded.
    Now what I was wondering is would you be able to incorperate a way to select what themes to exclude rather then it being hard coded?
    On my site I have modded your code so I can exclude the BuddyPress theme .
    Hopefully this makes sense.

    1. avatar
      wrote this comment on

      Hi, you can try what's described in the FAQ (see readme.txt). I'm not sure though if setting the theme to unpublished will have other effects as well.

  51. avatar
    wrote this comment on

    My theme doesn't use widget and I was wondering if you can provide me the template code?

    1. avatar
      wrote this comment on

      I think that <code></code> should work. Didn't test it though.

  52. avatar
    wrote this comment on

    Greetings from Turkey!

    We've installed Wordpress into /wordpress/ directory. And your Theme Switch plugin doesn't working now.

    How i can run Theme Switch plugin on our blog?

    Thanks in advance.

    1. avatar
      wrote this comment on

      Hello Fatih, the plugin works flawlessly for me, doesn't matter where I install wordpress.

      1. avatar
        wrote this comment on

        @Nicolas: Did you ever tried Theme Switch plugin on which blog Wordpress installed on different directory?

        1. avatar
          wrote this comment on

          Yes, and it works for me.

  53. avatar
    wrote this comment on

    Hi there, I've been using this for a while and I've developed a bit of a bug and I'm not sure if it's just my code or something else, but if I go from theme 1 -&gt; theme 2 and then back to theme 1, the page will refresh but the theme won't have changed. Going theme1 -&gt; theme 2 -&gt; theme 3 -&gt; theme 1 works though. The site in question is http://designtest.techgremlin.com/

    1. avatar
      wrote this comment on

      To be honest, I have no idea what could be going on on your site. Does the problem happen in different browsers? Do you have an other theme-related plugins? Or ones that do redirects?

      1. avatar
        wrote this comment on

        I think I fixed it, there was a bug in my server configuration that caused expires to be set to 30 days on everything.

  54. avatar
    wrote this comment on

    Hi Nicholas, I installed the plugin, enabled theme switching but don't see any tool or control for switching themes. Where would I find that?

    1. avatar
      wrote this comment on

      Hello Cameron, you need to use the widget or the shortcode to display the cloud.

      1. avatar
        wrote this comment on

        Thanks. That's working now. But I have one other problem. Even though I am logged in as admin in WP, I can only see the widget when it is set for "everyone" to see. I only want admin to see it while I do some theme customizing. Any idea what might be the problem?

        1. avatar
          wrote this comment on

          Are you sure you are logged in as admin, not an editor?

  55. avatar
    wrote this comment on

    Hello Nicolas,

    How would I set a cookie that never expires?

    Thanks in advance

    1. avatar
      wrote this comment on

      Hi Michelle, that's not possible. I don't know off-hand what the maximum cookie expiration time is, just set it to one year or so.
      60*60*24*365 = 31536000

      I guess that should be enough.

      1. avatar
        wrote this comment on

        Thank you Nicolas, that worked like a charm :-)

        Other than that, is there also a possibility to switch also "just" between style.css's?

        1. avatar
          wrote this comment on

          Hm, I'm not sure. It could probably work with child themes, but I've never tried that myself. You can read about how to make a child theme <a href="http://codex.wordpress.org/Theme_Development#Child_Themes_style.css" rel="nofollow">here</a>.

  56. avatar
    wrote this comment on

    Hi, great plug-in! Can not figure out though how to style the cloud created with shortcode. I see that a filetr creates a stylesheet but? In my theme it shows up as very tightly spaced links which is a bit hard to read. What can I use for CSS-styling? Would prefer a list when using for testing - showing others different styling.

    1. avatar
      wrote this comment on

      Hi Helen, you should install <a href="http://getfirebug.com/" rel="nofollow">firebug</a> for firefox. Then, right-click on the element you want to style and at the bottom right you can see where the styles are defined.
      I'd guess your theme is responsable for styling them.

      1. avatar
        wrote this comment on

        Thanks Nicolas! I had searched poorly for the classname.
        Found .nkthemeswitch-cloud-text and styled it in the theme style.css with no problem. Only, to make a list of the links instead of cloud have to do some kind of sorting/array not in the css. But after styling I thimk it´s good enough anyway. Makes my life easier showing different styles to co-workers/clients.

        1. avatar
          wrote this comment on

          Hi Helen. Hmm, I'm not sure what you mean, what kind of sorting do you need?

          1. avatar
            wrote this comment on

            I would like to display the different theme-links as an ul list instead of a "cloud" for greater clarity. Have put Themeswitch in its own page while testing/showing/developing and some of my visitors seems to be the very stressed-likes-powerpoint-types ;D
            But I think even those should be able to see the different links now with colored backgrounds and lots of spacing (margin/padding).
            To make a list instead I would have to getin to the code instead I guess? Or any options for that?

            1. avatar
              wrote this comment on

              Btw, as a quick fix you could probably do something like <code>blah { display: list-item; }</code>.

              1. avatar
                wrote this comment on

                That would be perfect! It would make Themeswitch complete, for my purposes anyway. There is the widget with dropdown but it doesnt seem to work for all users and havent had time to figure out why. Sometimes I dont want it in all sidebars either but maybe on a protected page that I can remove easily and also have comments on for direct feedback.

              2. avatar
                wrote this comment on

                But of course! Tried it earlier, but in the wrong place so I thought it didnt work. I am too short of time to think these weeks, must stop and breathe slowly... Thanks :)

            2. avatar
              wrote this comment on

              Oh, you're totally right. I just had a look at the code and the plugin doesn't produce a list, which it obviously should :-?

              I will update that code asap and make the list markup an option. I will probably make it the default choice in a future release.

  57. avatar
    wrote this comment on

    Thank you for the upgrade! Now it´s perfect with the choice of cloud or ul. Very easy to use.

  58. avatar
    wrote this comment on

    hii Nicolas
    I installed the plugin and it said plugin activated but i cant see anythin...must hav done sumthin wrong...i m usin wp 2.9...pls reply

    1. avatar
      wrote this comment on

      Hi Aniruddha. You have to use the widget or shortcode, or simply switch theme from the plugin's options page. Settings-&gt;Theme Switch I think.

  59. avatar
    wrote this comment on

    Hello Nicolas,

    installed the plugin running WP 2.9.2 - all is working fine. Maybe for further versions, there could be a normal formating the widget as elements. I'm using this plugin for switching just two styles, and so the tags are not ideal to be styled with css. So is there yet an option or code-snipet for calling the switch, with links to the themes?

    Thanks for short answer, sincerely Zwille.

    1. avatar
      wrote this comment on

      Hi Zwille, I'm not sure I understand what you mean? If you just want the links to switch have a look at the links on the plugin options page.

  60. avatar
    wrote this comment on

    Hi nicolas,

    I love and use your plugin, but I have one sugestion.
    Using screenchots with the names of the themes will be great and usefull.

    What do you think about it? Can you add this in nexts upgrades??

    Thank you!

    1. avatar
      wrote this comment on

      Hi Chris, good idea! I'll add that feature as soon as possible!

      1. avatar
        wrote this comment on
        Hi Nicolas and thanks for this plugin.
        I also have a real need for the theme titles to appear under the thumbnails so clients can tell me which one they want installed.

        Thanks.
        1. avatar
          wrote this comment on
          Hrm, according to my comment below I added this feature last year..
      2. avatar
        wrote this comment on

        Feature added, the new release will be available in a few minutes. I had to modify the <code>nkthemeswitch_cloud</code> function, so test the new release if you use that function in your theme.
        I added documentation on how to use that function to the readme.txt as well.

  61. avatar
    wrote this comment on

    Upgraded to v0.8.0 and now new theme doesn't display - looks like it's not reading the CSS file.

    1. avatar
      wrote this comment on

      Please be more specific. Which mode do you use, how do you switch, etc.

  62. avatar
    wrote this comment on

    Having a hard time understanding how the passkey preview links work. I have two generated links there already. What steps do I take to provide my client a link to see the unactive site being worked on?

    1. avatar
      wrote this comment on

      Hi arron, all switch links with passkeys are at the bottom of the plugin's settings page. you can just copy them from there and send them to your client.

  63. avatar
    wrote this comment on

    nice plugin..planning to use on the site
    voteup india.com

  64. avatar
    wrote this comment on

    Weiterhin super plugin! Nur konnte ich nicht herausfinden was folgende Option bewirkt (nach der ich dachte gesucht zu haben ;o):

    Das Umschalten von themes im Admin-Bereich aktivieren (für theme-spezifische Optionen)?

    viele Grüße und bitte weiterhin WP bereichern...
    ODL

    1. avatar
      wrote this comment on

      If the theme has an options page you will be able to access it if this option is enabled. Likewise for sidebars.

  65. avatar
    wrote this comment on

    Hi Nicolas, i tried to use your nice code in a multisite wordpress, but nkthemeswicth insist to show all the themes installed instead of alloweds ones.

    in multisite you can enable a theme globally or locally (is some tricky but it work, see http://wordpress.org/support/topic/417996) so when you use nkthemeswitch it show more themes that appear in one blog menu appeareance/themes (theme.php).

    may be it's needed to use get_ALLOWED_themes(); instead of get_themes();

    i try to change it but i get a error and i don't know what's missing. have you any idea?

    pd:
    here from messi land, we hope a nice and fair play to saturday game.
    (nice, to us)....

    1. avatar
      wrote this comment on

      Hi pescadito, interesting, I'll look into this asap. Thanks for the report.

      1. avatar
        wrote this comment on

        I'm just uploading a new version. Please check the FAQ on how to enable the get_allowed_themes() on a multisite install.

  66. avatar
    wrote this comment on

    perhaps you could check this:
    http://wordpress.org/support/topic/419554?replies=1

    1. avatar
      wrote this comment on

      Thanks a lot! I've been too busy to fix this yet, but will in a few days.

  67. avatar
    wrote this comment on

    cool plugins,,,

  68. avatar
    wrote this comment on

    I really wish it didn't pull every theme but just the ones enabled for the blog that the plugin is activated on, I've got some themes that I just don't want people seeing.

    Secondly, I might be missing it, but on the front end is there not an option to go back to the previous (original) theme? That would help if you're using the plugin to display available themes to potential clients

    1. avatar
      wrote this comment on

      There are various ways to exclude themes, see the FAQ. I'm not sure what you mean by go back? You can pick the default theme from the widget or the tag cloud. Or set the timeout.

      1. avatar
        wrote this comment on

        Thanks, sorry hadn't read the FAQ.

        But on the second question, I swear on Twenty Ten after selecting a different theme in the widget drop down there was no way of returning to the original theme or selecting another one except by just waiting for the timeout and refreshing the page.

        1. avatar
          wrote this comment on

          Hm. I'd guess you checked the &quot;exclude default themes&quot; option? That would hide 2010.

  69. avatar
    wrote this comment on

    firstly,this is really a wonderful plugin,but how can we change the place but the widget

    1. avatar
      wrote this comment on

      Hello Sky, I'm not sure what you mean?

  70. avatar
    wrote this comment on

    Hi Nicolas.

    No requests or questions here.
    Just wanted to let you know that your plugin is great!
    I took this day to find me a plugin that showcases the themes on my site. So I reviewed 9 different plugins, and yours is by far better and simpler to use than the others and it simply does the job it's supposed to do.
    Great job!

    1. avatar
      wrote this comment on

      Hey Amit,

      thank you :-)

  71. avatar
    wrote this comment on

    Hi again, Nicolas.
    After using your great plugin for a few days I do have a few requests :-) :
    I'd love it if the looks of the theme cloud was configurable.
    What I mean is instead of showing all the themes in one long column it would be nice to be able to present them in a matrix of rows and columns and to define how many themes will show in a row, and let it automatically set the number of rows.
    So, for instance, if I'd like to present 16 themes, and I defined 5 themes in a row, than what will be shown is 3 full rows and a forth row with just one theme.
    Another thing that can make an improvement is defining the spacing between the themes.
    Now when there are two adjacent themes with similar colors it's hard to spot where one stops and the other begins. A bigger space will solve that easily.
    If you could do these additions sometime it would be great and if not the plugin is still great and I'm still using it :-)
    Cheers.

    1. avatar
      wrote this comment on

      Hi Amit,

      hm, I think you can do all of this through CSS?

      1. avatar
        wrote this comment on

        I wouldn't know, I don't know CSS.
        Is there a specific file I'm supposed to edit?
        Sorry for the newbie question.

        1. avatar
          wrote this comment on

          Hi Amit, here's a list of sites that can help you:
          http://wsc.opera.com/ , www.htmlhelp.com/ , http://css-discuss.incutio.com/ , www.brainjar.com/ , www.htmldog.com/ , http://css.maxdesign.com.au/

          Also, install Firefox + Firebug. Good luck!

          You probably want to edit your theme's CSS file.

          1. avatar
            wrote this comment on

            Nicolas, Thanks a lot.

  72. avatar
    wrote this comment on

    After activating this plugin I'm greeted with the message "insufficient rights to view this page" trying to login to wp-admin. I have to delete the "nkthemeswitch" folder from plugins via FTP to regain access to the admin-area. Running 3.0.1

    1. avatar
      wrote this comment on

      Hm, that's very odd. I'll try to reproduce, but insufficient rights is an indicator that you tried to run some admin action, not simply log in.

      1. avatar
        wrote this comment on

        Yes, I tried to log in as admin. When logged in as admin and then activating the plugin, when I click on another link within the admin panel I get the same message.

        1. avatar
          wrote this comment on

          Ok. Do you use any plugin that has to do with user/group permissions? I doubt I'll be able to reproduce your problem here, but I hope I'll get the time to look into it over the weekend.

          1. avatar
            wrote this comment on

            Update: I did a clean install of wordpress 3.0.1 and your plugin worked just as announced, so I guess the problem lies elsewhere. It's probably a good idea to do a clean install from time to time anyway!

            1. avatar
              wrote this comment on

              Thanks for looking into this in detail :-)

          2. avatar
            wrote this comment on

            Hi, thanks for looking into this. I have disabled all other plugins (none of them related to users/groups), but the behavior persists. But only after clicking one of the "Open theme in new window"-links. As soon as the other window is opened (still default theme though, not the one I clicked), I'm locked out of admin and have to delete the nkthemeswitch-directory via FTP to regain access. Strange indeed!

  73. avatar
    wrote this comment on

    Hi Nicolas,

    I've been using your plugin for two months now with FireFox and it's great.
    But today I entered my site with Internet Explorer for the first time and noticed that the themes don't change when I click on them.
    Have you ever encountered this before?
    Is there a solution?

    1. avatar
      wrote this comment on

      Hello Amit,
      no I've never heard of such a thing. I can only guess it's a temporary problem with your IE.

      1. avatar
        wrote this comment on

        OK, solved it.
        I was using a cache plugin.
        I can do without it.
        Thanks.

        1. avatar
          wrote this comment on

          Ah yes, that is a known limitation and mentioned in the readme. Not IE-specific though. :-)

  74. avatar
    wrote this comment on

    Hi Nicolas

    This looks really great. I'm going to download and give this a try! I'm working on my first theme so I don't have more than one at the moment, I was wondering...

    Is it possible to have this work as a "demo bar" at the top of the screen like you see on many premium theme sites like WooThemes? You know, where there's a dropdown menu or similar as opposed to the sidebar?

    If your plugin already offers this, I apologize for not checking but if it doesn't, would it be easy-ish to create something like this with CSS do you think?

    Many thanks for what looks like an awesome plugin :)

    Scott

    1. avatar
      wrote this comment on

      Hello Scott,

      hmmm, yes I guess you could display the theme cloud at the top through CSS. I haven't built such a feature for the plugin though. If you don't want to depend on the widget or shortcode you could write a short plugin that hooks into wp_footer() and always injects the switch markup there. Basically, add_action( 'wp_footer, 'your_callback_function' );

  75. avatar
    wrote this comment on

    Hi, great idea for a plugin. However, when I activate the plugin, I get nothing but a blank screen.

    I went back to the dashboard by entering the wp-admin link directly in the address bar, and the dashboard works fine.

    Theme Switch's settings can be accessed. However, if I try to go to the Plugins page, again, I get a blank page.

    1. avatar
      wrote this comment on

      That's very odd, no, I have no idea what's going on. Maybe you could try to deactivate all other plugins temporarily, maybe one of them interferes with mine. Just a guess.

      1. avatar
        wrote this comment on

        Hi Nicolas. I've discovered the plugin that's conflicting. It's the Wordpress.com stats plugin, here: http://wordpress.org/extend/plugins/stats/

        The stats plugin is excellent, as is yours. I'd hate to lose one over the other. Any idea what the problem might be?

        I'm using the latest version of WP.

        1. avatar
          wrote this comment on
          Hi Nicolas, just wanted to give you an update on this. Turns out it wasn't a plugin problem at all (yours or anyone else's). It was actually my webhost's PHP memory limit which was set far too low. Have since increased the limit, which has put an end to blank pages altogether.

          Once again, thanks for a great plugin. I find it invaluable for tweaking and testing my website's design.
        2. avatar
          wrote this comment on

          Thanks for the update! I'll try to have a look in the near future.

  76. avatar
    wrote this comment on

    This plugin looks promising. :)

    I'm trying to customize a complex RocketTheme theme on my live blog, but I'm not sure how to switch themes in the admin area. I can switch the theme on the frontend, but it results in an error message (Fatal error: Call to a member function displayHead() on a non-object in /wp-content/themes/rt_kinetic_wp/index.php on line 13) which I assume would go away if I could "activate" the theme in the backend.

    Is there a switch in the backend, or is it supposed to automatically switch in the backend once switched in the frontend? If the latter is the case, then I suspect that the RocketTheme theme is just too complex for this plugin. :/

    1. avatar
      wrote this comment on

      Hm, I guess I'd have to look at the theme source. I just checked and it seems to be a paid-for theme? Or can it be downloaded?

  77. avatar
    wrote this comment on
    Hi - love the plugin. One issue though - I'm setting up a site that has three backgrounds selectable by the visitor. The plugin is working great - but I'm using Child themes (Of Twenty Ten) where I'm modifying the backgrounds. Obviously it means that where WP or Twenty Ten is updated, so are my new themes etc.

    So I've made my three sub directories:
    City
    Ballons
    Bottle

    and they all show up in your drop down, and work fine. GREAT!

    ** BUT ** Twenty ten itself also shows up. I don't want this to appear... how do I ensure this doesn't happen?
    1. avatar
      wrote this comment on
      IIRC there's a setting on the options page so that you can exclude the default themes. Did you try that yet?
  78. avatar
    wrote this comment on
    Just wondering - if I set the Cookie expire (seconds) to either zero or leave it blank will the cookie NOT expire? I'd like to allow visitors to set their preferred background and have it stay on that indefinately.

    Thanks in advance...
    1. avatar
      wrote this comment on
      I don't really rememeber what would happen then. Cookies have a maximum lifetime anyway, you can set the time to that.
  79. avatar
    wrote this comment on
    Hi Nicolas, I've been using your plugin with FireFox 4.0 and it's great. But if I try it with Chrome or IE it doesn't work. The themes don't change when I click on them. I think that there is a problem with caching but I haven't installed any cache pulgin... my Cookie lifetime is ste to 1 sec. Is there a solution?

    Thanks...
    1. avatar
      wrote this comment on
      Hmmm, try setting the cookie lifetime higher.
  80. avatar
    wrote this comment on
    Hi Nic, I'm wondering if this could be the plugin I'm looking for. The is I want to have a theme switcher, but the problem about theme switchers you need to manually drag back again the widgets from inactive widgets to where it should be once you change the theme from one to another... I have tried your plugin yet, I'm asking you first if this could be the thing that I'm looking for... thanks
    1. avatar
      wrote this comment on
      It depends on the themes + their sidebars i guess. If they use different IDs the widgets could disappear I guess. It's been a long time since I worked on this code :-)
  81. avatar
    wrote this comment on
    Hi Nicolas, great plugin however i have one problem or should I say question. does the user need to be logged in for it to work. At the top you say

    Only with passkey: Send your clients preview links. They won't need an account on your blog for this to work.

    If I am logged in the link works if i am not it just shows the default theme. Am I doing something wrong?

    Link am using http://www.ewca.org.uk/?theme=Academica&passkey=18445934774e6a21826726b

    1. avatar
      wrote this comment on
      IIRC there are preview links on the admin page. You can just copy it from there. I hope that helps.
  82. avatar
    wrote this comment on
    Hi Nicolas, great plugin! I have a small issue though. When someone besides the admin switches the theme, it stays switched even when they log out. It stays switched on their computer until they clear their cache. Is this normal, or did I do something wrong? I would like my users to have their chosen themes displayed when they log in.
  83. avatar
    wrote this comment on
    Hi Nicolas, I've been trying to use your plugin but the theme stays switched on the computer no matter who logs in. Also, their theme is only changed on their computer, meaning if they log in somewhere else the theme will switch back to default.

    For example, on my computer I chose a pink theme. When my brother logged in he chose a green theme (on the same computer). Then, when I logged in as myself I see the green theme instead of the pink one I chose.
    1. avatar
      wrote this comment on
      Hi Otaku, that's right. The plugin only works through cookies, so theme theme switch is tied to a browser, not users. It would be possible to add the functionality but I don't really have the time to add new features.
  84. avatar
    wrote this comment on
    Hello Nicolas,

    I'm currently developing a WordPress site to replace my hard-coded site -- which is basically gutted except for a construction sign. In testing your plugin, I've uploaded Wordpress and two themes. I implemented your plugin on the first theme that I uploaded and configured it in the settings page. Then I switched to the other theme while in your plugin settings page and added the theme switcher to that theme as well. When I view that site, click the switch to go to the other theme, the switch widget is gone when I get there. The plugin exists in both themes when looking on the admin sidebar, but it's either on one or the other of the themes, but not on both. What am I doing wrong? In the theme where the switch is missing, it's not even in the widget storage area on the left side. If I remove the switch from the other theme, then it will be available to install when I go back to the previous theme. Any ideas will be greatly appreciated.
    1. avatar
      wrote this comment on
      When the switch widget is in a sidebar that doesn't exist in the other theme it might be hidden after the switch. It's been a while I worked with this plugin.

      There is another widget storage area below the main one, I think the widget should end up there if it's not in any of the active sidebars.
  85. avatar
    wrote this comment on
    Hi Nicolas,

    Thanks for a great widget, has a question:

    How is it possible to remove a thema that I do not want to appear on the widget ? Is it possible to arrange this ? Then is this great for my side ... stefan
    1. avatar
      wrote this comment on
      Hi Stefan, yes, there is a line you can put into the style.css file, please check the README file, I don't remember right now.
  86. avatar
    wrote this comment on
    Hi Nicolus,

    Just read above you have stopped working on this plugin but it does continue to work in the new 3.4! Thank you...

    I just noticed a small issue in the rendering from the "Widget Title" field'd data in the configuration of the plugin. The title I am using has an apostrophe which is causing a backslash to render. e.g. \'

    Could this be the server setup or the plugin?


    Cheers!
    1. avatar
      wrote this comment on
      It's probably the plugin, but I don't know.. haven't looked at the code for ages..
  87. avatar
    wrote this comment on
    Hello first, thank you so much for your amazing plugin :) I've some question, I've try install plugin at http://lost-sheep.us/wordpress ( at footer)

    I don't know why link of Switch theme not going to my main page, but it going to some blog post (ex. http://lost-sheep.us/wordpress/2010/06/05/post-with-picture/?theme=Twenty+Eleven) it not going to something like http://lost-sheep.us/wordpress/?theme=Twenty+Eleven

    Thanks :) my wordpress is latest version, work with your 0.9.0.3 plugin