• Hi I’ve installed Alex’s Style Switcher plugin and on the whole it works very well. I can change themes, I’ve set the default theme and so on.
    I have found a quirk though and was wondering if anyone had any thoughts.
    I have set my default theme per the readme by putting the style name as an argument in index.php :
    @import url( <?php wp_stylesheet("dots"); ?> );
    I have removed the cookie for my site. When I go to the front page I see my selected theme. If I then do a browser refresh and it returns to the default theme. The reason appears to be is that the newly created cookie has

    wpstyle
    wp-default

    as the first two lines.
    The problem appears to occur because a cookie is being created before the theme is set (or at the same time, not knowing how php or wordpress works under the covers).
    Looking closely at the plugin file I note that the function wp_style_cookie(); is being called. My guess is that when you load a page, the plugins are checked, as the style switcher is active, its loaded and as there is no cookie it creates one with the wp-default theme set, the page is then loaded with the override set in index.php, when a refresh occurs the process starts again but this time there is a cookie and its style is used instead?
    Rob

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tarasis

    (@tarasis)

    A%$e forgot to say, using WordPress 1.2.1 and Style Switcher 1.5

    FWIW, it seems to be working for me?
    I just went and set it to Dots and it stayed?
    Let me go try again.
    …few seconds later.
    Yes, it still stayed as the newly changed one.
    p.s. Where did you find that plugin?
    Hope your problem was solved?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Style Switcher refresh problem’ is closed to new replies.