WordPress.org

Ready to get started?Download WordPress

Forums

single category css not working for comments (4 posts)

  1. y0sono
    Member
    Posted 9 years ago #

    I am implimenting this from the codex:

    http://codex.wordpress.org/The_Loop_in_Action#Different_CSS_For_Different_Categories

    first, I wasnt able to get it working by using "in_category" that was throwing errors with wp 1.5.1.3, so I used the "is_category" like the kubrick sidebar uses and that worked.

    here is the code i'm using in the header.php:

    http://pastebin.com/332415

    But it doesnt work on a comment page in a category, it shows the default css file rather than the category css file... i've been doing a of of head-scratching, but am not sure which way to turn - any ideas?

    my site: http://wearecentralpark.com/wp

    the categories can be accessed under the "Navigate" in the sidebar.

    The only CSS i'm changing is for the BG images on the posts... the default style has the orange coloured post BG images, just so you know what to look for.

  2. oriecat
    Member
    Posted 9 years ago #

    Once you go to a comment page, you are no longer on the category page. You are on either index.php or single.php.

  3. y0sono
    Member
    Posted 9 years ago #

    thanks, oriecat, what do I need to do in my header in order for the comments to pick up the appropriate style sheet for the category I'm in? Is there something like a "is_single_category" that I could add to the header?

  4. lokjah
    Member
    Posted 9 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.