Title: modifying Style-Switcher
Last modified: August 18, 2016

---

# modifying Style-Switcher

 *  [planetphillip](https://wordpress.org/support/users/planetphillip/)
 * (@planetphillip)
 * [21 years, 12 months ago](https://wordpress.org/support/topic/modifying-style-switcher/)
 * Hi,
    I’m using Alex King’s excellent Style Switcher but would like to change 
   the way it displays the options. Instead of creating a vertical list like this:`
   red blue green purple I would like to produce a horizontal list seperated by 
   commas. Like this: red, blue, green, purple I know almost nothing about php but
   guess that the code I need to modify is this part: if ($in_list == 1) { $ss ='
   <li id="style">Style:'.$ss.' '; } echo $ss; Can anybody help? Have I misunderstood
   the problem, is my answer contained in the CSS? TIA Phillip

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

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 12 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-65469)
 * Indeed the answer does ……
    Looking at your page, if the choices stay where they
   are, then although they could display inline they could wrap messily ? Do you
   plan on them remaining there, or are you wanting to move them ? I ask because
   the solution would / could be different …..
 *  Thread Starter [planetphillip](https://wordpress.org/support/users/planetphillip/)
 * (@planetphillip)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-65780)
 * *bump*
 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-65781)
 * It is just a list, why don’t you set it to display:inline?
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-65784)
 * Yup …
    Into CSS add: .style { display: inline; } In the index.php, you can do
   it by manually creating the styleswitcher setting: `<li>Styles <ul> <li class
   ="style"><a href="//www.bbc.co.uk/index.php?wpstyle=four"">Blue</a></li> <li 
   class="style"><a href="//www.bbc.co.uk/index.php?wpstyle=four"">green</a></li
   > <li class="style"><a href="//www.bbc.co.uk/index.php?wpstyle=four"">yellow</
   a></li> <li class="style"><a href="//www.bbc.co.uk/index.php?wpstyle=four"">red
   </a></li> <li class="style"><a href="//www.bbc.co.uk/index.php?wpstyle=four""
   >orange</a></li> <li class="style"><a href="//www.bbc.co.uk/index.php?wpstyle
   =four"">purple</a></li> <li class="style"><a href="//www.bbc.co.uk/index.php?
   wpstyle=four"">white</a></li> </ul> </li>
 *  Thread Starter [planetphillip](https://wordpress.org/support/users/planetphillip/)
 * (@planetphillip)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-65809)
 * Beel:
    Becuase I didn’t know it existed. 🙁 Thanks for the heads up. Podz: That
   works, thanks. I don’t want to seem ungrateful, but, it’s not exactly what I 
   want. I have a few static pages, which means I will have to edit every page when
   I add or remove a new style/colour. I tried add this to my index.php page but
   it didn’t work. Is there an obvious reason why? `<li class="style"><?php wp_style_switcher();?
   >  Thank you both for your help so far.
 *  Anonymous
 * [21 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-65810)
 * Hang on, I just woke up and need some coffee. I will edit this in a minute or
   two…
 *  Thread Starter [planetphillip](https://wordpress.org/support/users/planetphillip/)
 * (@planetphillip)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-65825)
 * YOU ARE THE MAN!
    Your code works almost perfectly in Mozilla but ignores the
   commas in IE6. Neither Mozilla or IE6 adds the period at the end but that doesn’t
   matter at all. At the risk of upsetting you, now I see both, I think the comma-
   less one looks better. Thanks for your help.
 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-65826)
 * I never liked those psuedo-elements anyway, too browser specific, etc. I just
   wanted to see if it could be done in non-IE browsers. That last comma would have
   been a killer for me and I saw there was no way to prevent it without having 
   to do considerable hacking in styleswitcher (too much work to remove a simple
   comma!).
 *  [aliasjanedoe](https://wordpress.org/support/users/aliasjanedoe/)
 * (@aliasjanedoe)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-66243)
 * I tried adding the
 * .style {
    display: inline; }
 * to my style.css and it did nothing. Any idea how I might have messed up?
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-66244)
 * aliasjanedoe – a link to your site would help us 🙂
 *  [aliasjanedoe](https://wordpress.org/support/users/aliasjanedoe/)
 * (@aliasjanedoe)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-66245)
 * [http://www.different-dimension.com/AliasJaneDoe/wordpress](http://www.different-dimension.com/AliasJaneDoe/wordpress)
 * I don’t have the display: inline thing in any of my css anymore in case it was
   doing something strange in another browser, though. But I want to be able to 
   change how the styles list appears in just certain layouts (for now, the River
   Tam one), not all of them. Like I know you can do them as a drop-down box by 
   editing index.php, but that would change it everywhere.
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-66246)
 * I’m not sure you can do this in the version of WP that you have.
    In 1.2.1, the
   style switcher literally just changes the style, not any core files nor does 
   it select any core files dependent on the syle being used. So you can have a 
   vertical list, or a horizontal list.
 * If you were to upgrade to 1.5.1.3, then the level of control offered there could
   give you the look you want. But….. there are many styles that existed for 1.2.
   x that do not exist in 1.5.x That said, there are many many more Themes and they
   really do offer greater flexibility.
    [http://themes.wordpress.net/theme-viewer.php](http://themes.wordpress.net/theme-viewer.php)
 * If you’ve any questions.. fire away.
 *  [aliasjanedoe](https://wordpress.org/support/users/aliasjanedoe/)
 * (@aliasjanedoe)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-66247)
 * I’m not looking to upgrade. Something *always* goes wrong when I attempt upgrades
   of things. But thanks anyway. And if anybody figures it out for 1.2, let me know.

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

The topic ‘modifying Style-Switcher’ is closed to new replies.

 * 13 replies
 * 5 participants
 * Last reply from: [aliasjanedoe](https://wordpress.org/support/users/aliasjanedoe/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/modifying-style-switcher/#post-66247)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
