I have two themes: “Default” and “Alternate”.
I’d like to place a link on my site that says “Switch to Alternate Theme”, which will change the default theme to the alternate and vice versa. A cookie would be set to save which theme the user is currently on, so when they return they will see the last theme they selected.
How do I change the theme on the fly in wordpress?
Thanks!
You can use Theme Switch and Preview.
If you are up for coding this yourself, you can use the
template
andstylesheet
filters.E.g.: to switch to Twenty Ten: