WordPress.org

Ready to get started?Download WordPress

Forums

Switch themes by cookie (2 posts)

  1. philgreen
    Member
    Posted 4 years ago #

    I have a wp install that works with my main website. I'm testing out a redesign by giving a cookie (let's call it x=1) to some users and that cookie is seen by the php on the main site and makes them see the new design instead of the old one.

    I made a wp theme that matches this new design and I want to assign it to users who come into the blog with that cookie so that if they have x=1, they'll see a "theme2" version of the blog rather than "theme1". What is the simplest way to do this?

    If you don't know how to do it but know where to start looking. Any help would be appreciated.

  2. ClaytonJames
    Member
    Posted 4 years ago #

    Have you considered deciding on a default theme to display, but providing the users with a theme switcher to let them choose? Then on a return visit (providing they don't clear the browser cache) the cookie is already set for their theme preference.

    http://wordpress.org/extend/plugins/theme-switcher/

Topic Closed

This topic has been closed to new replies.

About this Topic