• Hello can someone please help.

    I’ve got this if is page statement and it works fine. But i need to modify it so that it works with category IDs instead of is page.

    here is the code. Its on the body tags.

    <body <?php if ( is_page(‘Home’) ) { echo ‘ class=”active”‘; } ?>
    <?php if ( is_page(‘Im a member’) ) { echo ‘ class=”active2″‘; } ?>
    <?php if ( is_page(‘Im new’) ) { echo ‘ class=”active3″‘; } ?>>

    Can someone help me please.

Viewing 1 replies (of 1 total)
  • Thread Starter gum1982

    (@gum1982)

    <body <?php if ( is_category(‘Im a member’) ) { echo ‘ class=”active”‘; } ?><?php if ( is_category(‘Im new’) ) { echo ‘ class=”active2″‘; } ?>
    <?php if ( is_category(‘next’) ) { echo ‘ class=”active3″‘; } ?>>

    I got this working on categories now but i want it to work on every post within those categories it basically just changes the background colour on the category page but i want it to work when posts are inserted into that category.

    Any help

Viewing 1 replies (of 1 total)

The topic ‘CHANGING STYLESHEET’ is closed to new replies.