Title: Javascript style switcher and Permalinks
Last modified: August 18, 2016

---

# Javascript style switcher and Permalinks

 *  [selcouth](https://wordpress.org/support/users/selcouth/)
 * (@selcouth)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/javascript-style-switcher-and-permalinks/)
 * I am using a Javascript style switcher to let my viewers change style sheets 
   and whatnot. It works fine and dandy with `...index.php?p=369` but when I have
   permalinks set to /%postname%/ (which I desire) it appears to be ignoring the
   cookie and displaying the default style. I think it’s something with the RewriteRules
   but I don’t know know enough about them to hack at it. Any ideas?

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

 *  Thread Starter [selcouth](https://wordpress.org/support/users/selcouth/)
 * (@selcouth)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/javascript-style-switcher-and-permalinks/#post-232164)
 * Update: It appears to not get the style when you go to the link [http://host.com/postname/](http://host.com/postname/)
   but it works fine with [http://host.com/postname](http://host.com/postname) –
   Try it for yourself: [http://selcouth.com/standards-shmandards/](http://selcouth.com/standards-shmandards/)
   vs [http://selcouth.com/standards-shmandards](http://selcouth.com/standards-shmandards)(
   set a different style). I changed permalink option to /%postname% (without the
   trailing /) but it adds it after I update permalink structure.
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/javascript-style-switcher-and-permalinks/#post-232176)
 * You might have better luck using Ryan Boren’s themeswitcher written specifically
   for WP. It’s written in php instead of using js – always a good thing.
 * Main wiki page: [http://dev.wp-plugins.org/wiki/ThemeSwitcher](http://dev.wp-plugins.org/wiki/ThemeSwitcher)–
   link to download file from there….
 *  Thread Starter [selcouth](https://wordpress.org/support/users/selcouth/)
 * (@selcouth)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/javascript-style-switcher-and-permalinks/#post-232177)
 * Yea I was actually just thinking of switching to a PHP one. The one you linked
   is to switch between WP themes. I found one to change my CSS and it all works.
   Thanks for the idea!

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

The topic ‘Javascript style switcher and Permalinks’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [selcouth](https://wordpress.org/support/users/selcouth/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/javascript-style-switcher-and-permalinks/#post-232177)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
