WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to set up a theme demos site, so I am looking for a theme switcher. I have tried a few of them, they create the demo url like:


But I am looking for any plugin which generates cleaner urls, for example:


If there is any, please let me know.

So I am looking

share|improve this question
up vote 1 down vote accepted

This has to do with .htaccess rather than wordpress itself.

You could just add a row to your htaccess files.

RewriteRule ^(.+)/theme-(.+)$ $1?themedemo=theme-$2%{query_string}

$1 is argument one, the first appearance of (.+) and is the page name
$2 is the second argument, the second appearnce of (.+) as in the theme name

so if you write:

example.com/about/theme-thesis it should get the content from example.com/about?themedemo=theme-thesis

try it out!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.