Support » Fixing WordPress » How to make the css switcher from alistapart work on WordPress

  • Resolved CtiaKitahara

    (@ctiakitahara)


    Hi everyone,

    I have a website with a css switcher. I have seven different stylesheets. I used the code from the site alistapart which worked just fine but now that I’m using WordPress I don’t know how to make it work anymore. I created my theme and put the original style in it. The other ones I put in a folder in the root of the site, it seemed to work because the color scheme changes, but it doesn’t show the images. Where should I place them to make it work? Please, somebody help me!!! It’s really urgent because the site was already online when I decided to use WordPress. I tried to download a plugin, but the only one I found lets me use just 6 stylesheets, I need 7!!! Help, please!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • “Please, somebody help me!!! It’s really urgent because the site was already online when I decided to use WordPress.”

    Relax, your site still works fine without the styleswitcher. If it really IS as urgent as you say, try the WP-PRO mailing list.

    Moderator Andrew Ozz

    (@azaozz)

    WordPress Dev

    In WP the stylesheets go into your theme’s directory and images used in them usually go into “images” directory in your theme. You will probably have to change the javascript a bit to make it all work.

    The thing is I’m not a programmer.
    I visited a list apart site and I found the php switcher that is better than the java script one, but the problem is I don’t know how to put it in the wordpress because the code goes exactly in the same place as the wordpress tag to call the stylesheet.
    Does anybody knows how to solve this?
    Thanx,

    Guys,
    I’ve just found the solution!!! I’m very happy!!! I found it here in another topic.
    Thank you very much!!

    christophdollis

    (@christophdollis)

    Umm, CtiaKitahara… not to put too fine a point on it, but can you share the solution?

    Or at least tell me where I might find it?

    “I’ve just found the solution!!! I’m very happy!!!”

    … is great, but not very helpful to me!

    Pretty please?

    christophdollis

    (@christophdollis)

    The answer has been founded on the www!

    This woman is a genius web designer (I love her site) and if anyone wants to use A List Apart’s ULTRA simple and effective PHP stylesheet switcher, no Javascript or plugin required, the answer’s here:

    jet2k.com

    CtiaKitahara

    (@ctiakitahara)

    Sorry, Christophdollis,

    I was very selfish not sharing the solution I found. But, please don’t get me wrong. Since I found the solution on this very same forum, I thought that others could also find it easily, and that I was just being a bit slow.

    Anyway, here it goes the solution I found. It was very very simple, you just need to put the alternate stylesheets in your theme’s folder and add the template tag <?php bloginfo('template_directory'); ?> to the path to it. The code will look like this in the header of your theme:
    <link href="<?php bloginfo('template_directory'); ?>/youralternatestylesheet.css" rel="alternate stylesheet" type="text/css" title="youralternatestylesheettitle" />

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to make the css switcher from alistapart work on WordPress’ is closed to new replies.