Support » Plugins and Hacks » Single Cat php CSS

  • Thanks to Techgnome and Beel I have now got a single cat (cat 15) running on my front page. I am now trying to style it differently. I have searched here fairly comprehensively. I would imagine it is something like (in laymans language) :
    if the cat is 15 load wp-layout.css2 else load wp-layout.css.
    Could one of the php guys / girls possibly help out with the syntax. ?
    Thanks.
    Edit: oh I forgot to mention podz as well. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • http://wordpress.org/support/10/12028
    Possibly close maybe ?

    TechGnome

    (@techgnome)

    Moderator

    Try this… where the importURL is for the style…..
    importURL( <?php if ($cat = 15) { echo “path to style 15.css”;} else { echo “style to other posts.css”; } ?>
    That’s just off the top of my head. I *think* that will work.
    TG

    TechGnome tx that looks cool but where is the @ ?

    TechGnome

    (@techgnome)

    Moderator

    :blank stare:
    HUH? What @? I see no @.
    Oh. I told you it was off the top of my head…. If you *must* have 100% correct code…..
    @import url( <?php if ($cat = 15) { echo “path to style 15.css”;} else { echo “style to other posts.css”; } ?>
    🙂 Import url is two words, not one. ;P
    TG

    Looks cool . You know I am pretty thick. With php I cant afford to take any chances 🙂

    Thanks for the help guys but I managed it without the php. Separate CSS for my single cat front page . Yay 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.