Forums

CHANGING STYLESHEET (2 posts)

  1. gum1982
    Member
    Posted 2 years ago #

    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.

  2. gum1982
    Member
    Posted 2 years ago #

    <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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.