WordPress: using a test theme only for a specific user

I’m testing a new template for a wordpress based site, and I’d like to test it directly on the live version instead of making copies. I thought I could create a test user (wordpress is bridged with vbulletin which handles user auth), serve the usual theme to anyone BUT that specific user, who would get the new testing one.

I don’t want to install a plugin, I’m looking for the right place to edit to insert this check:

Read More
if logged user == test_user_id
    serve 'testtheme'
else
    serve 'normaltheme'

The userid can be get from $_COOKIE.
I tried hacking the get_template() function in wp-include/theme.php but apparently that was not enough. Any suggestion?

Related posts

Leave a Reply

3 comments

  1. Just logging into my old WordPress.com blog, I see that I can do all the previewing I want from the themes manager already – click around to any page I like, or bring up the frame’s URL to see what query string I’d have to append to a URL to get the same preview, e.g.

    ?preview=1&template=pub/mytheme&stylesheet=pub/mytheme
    

    Any reason that’s not enough?

  2. Perhaps you should add a column to your user table, call it “is_beta” and if it’s set to 1 then enable beta features/themes. This way you can easily add or remove people from the beta, and when you’re beta is ready to launch, you flush the column for everybody and make the features default.