Title: category conditional statement
Last modified: August 20, 2016

---

# category conditional statement

 *  [roclimb](https://wordpress.org/support/users/roclimb/)
 * (@roclimb)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/category-conditional-statement/)
 * I want to add a class to my css if a category is displayed but I can’t get it
   to work.
 * I added this to my header:
 * <?php if ( is_category(‘areas’)) { echo ‘ class=”myclass” ‘; } ?>>
 * I want to add this class to my stylesheet to any page in this category so It 
   changes the look of any page in that category. It isn’t working though.
 * Ive read through a lot of the codex and this is all I can figure to do
 * Any suggestions?
    Rob

The topic ‘category conditional statement’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [roclimb](https://wordpress.org/support/users/roclimb/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/category-conditional-statement/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
