• I am using a php style switcher from https://www.sperling.com/examples/styleswitch to allow the visitors to my website to change the stylesheet from a light theme to a dark theme.

    The styleswitcher is working fine on the static pages of my website (not powered by WordPress) but when I go to my index page and other pages powered by WordPress the style switcher doesn’t work. I have added the same PHP codes to the header.php of my WP theme as I have my static pages, but still no joy.

    Any help would be very much appreciated.

    See: https://www.atmymost.co.uk/me (styleswitcher working)
    and: https://www.atmymost.co.uk (styleswicher not working)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Are you supposed to have 2 different uri’s for the style switcher? I’m not familiar with this plugin.

    Maybe because WP is using its own “technique” to switch themes. You can have unlimited number of themes installed and using a theme switcher plugin your visitors can change the look (the cookies will even remember their choice).

    Thread Starter Alys

    (@alys)

    I understand that wordpress is using a unique technique :), I am trying to achiive styleswitching for my whole webite (the blog and the static). I have used the plugin but it as soon as I navigate away from a wordpress page, the theme goes back to defult and I have to set it again!

    Thread Starter Alys

    (@alys)

    Just a thought: If I use the same name for the cookie which I used to change the style on the static pages as wordpress uses for switching themes, will they both work together?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress and PHP style switchers’ is closed to new replies.