In: , ,
On: 2005 / 09 / 15
Shorter URL for this post:

Ever wanted to test or tweak an alternate Theme for WordPress, but don't want things to look messy for your visitors ? You have two solutions.

Another Test install
That's an easy one, just set up another WordPress blog and play with it, tweak it, break it, no once cares. The only thing you may want to check before playing is that it sends no ping (Options / Writing / Update Services) and no trackback (Options / Discussion) when you post random junk, because your test install will soon be discovered by others … and by spammers :)

Use the Theme Switcher
This solution doesn't even require you to set up another blog. It consists in installing a Theme Switcher, and making it available for you only.

  1. Get the plugin : theme switcher
  2. Activate it
  3. Add the following code somewhere in your sidebar.php :
    1. <?php
    2. if (
    3.     (preg_match("/wordpressuser[^=]*=admin/i", $_SERVER&#91;"HTTP_COOKIE"]))
    4. ) { ?>
    5.     <div id="themeswitcher">
    6.     <h3>Theme</h3>
    7.     <?php wp_theme_switcher(); ?>
    8.     </div>
    9. <?php } ?>

From now on, people logged in with "admin" will be able to see the theme switcher and select another theme. Others will stick to the theme selected by default.

Shorter URL

Want to share or tweet this post? Please use this short URL:


This entry "How To Tweak WordPress Themes Without Messing Blog Around" was posted on 15/09/2005 at 10:18 pm and is tagged with , ,
Watch this discussion : Comments RSS 2.0.

2 Blablas

  1. L*F says:

    there was a mess around?

  2. Ozh says:

    Yes, pendant quasi five secondes.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?