WordPress Plugin: Theme Switcher

March 29, 2005 by  
Filed under PHP, Wordpress

I meant to post this a while ago, but I forgot. I installed the WordPress Theme Switcher plugin (written by Ryan) to test out all the themes (especially the ones I was submitting for Stacee).

To install it, just download this file, upload it to your /wp-content/plugins/ directory. Then activate it in the Admin control panel.

Now in your templates, add this to your sidebar:

<?php if (function_exists(‘wp_theme_switcher’)) { ?>
<li><h2><?php _e(‘Themes’); ?></h2>
<ul><?php wp_theme_switcher(); ?></ul>
</li>
<? } ?>

The if statement just says, if this function is available (if the theme is activated), then print the list of themes. Of course, you may customize the output however you want. There’s a little bit of PHP coding, but nothing to be too scared about. :)

Related Posts Plugin for WordPress, Blogger...
  • P. Starrenburg

    Daynah do you know what code WordPress uses to choose a specific theme so you can just have a link on a page (like you have on sidebar on your blog) to change directly to a theme.

    I just need that, no need for dynamic built theme switchers with cookies etc. Just to change back and forward between specific themes.

    Appreciate any pointers.

  • P. Starrenburg

    Daynah do you know what code WordPress uses to choose a specific theme so you can just have a link on a page (like you have on sidebar on your blog) to change directly to a theme.

    I just need that, no need for dynamic built theme switchers with cookies etc. Just to change back and forward between specific themes.

    Appreciate any pointers.

  • http://daynah.net daynah

    The code uses cookies to change themes. The variable wptheme is saved as a cookie also. If you just want a link to theme changes, you might want to look at this article that I wrote a few years ago. http://board.php-princess.net/index.php?showtopic=33

  • http://daynah.net daynah

    The code uses cookies to change themes. The variable wptheme is saved as a cookie also. If you just want a link to theme changes, you might want to look at this article that I wrote a few years ago. http://board.php-princess.net/index.php?showtopic=33