Title: Specific category styles
Last modified: August 18, 2016

---

# Specific category styles

 *  [satoshi](https://wordpress.org/support/users/satoshi/)
 * (@satoshi)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/specific-category-styles/)
 * I remember seeing somewhere a plugin that would allow you to apply different 
   stylesheets for different categories/authors. But I dunno if that was for the
   single post view or not. What I’m looking for is a simple script (preferably 
   php) that would enclose the post in a set of div tags if it belonged to a certain
   category (e.g. “reminders”). I’d like to do this so that the reminder posts don’t
   take up nearly as much space as a regular post. I already tried doing an `if (
   $cat = 24)` but that just applied it to every post because $cat is used at the
   top of the template to tell it what categories to show.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [lbessant](https://wordpress.org/support/users/lbessant/)
 * (@lbessant)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/specific-category-styles/#post-91520)
 * I did something similar to make my own comments show up differently from those
   made by visitors.
    The thing you need is more along the lines of `if ($cat ==
   24)` (Not guaranteeing that will work, but it’s closer) What you have sets $cat
   to 24 and returns a true value because it’s managed to do it successfully. The
   double = compares the values….
 *  [NuclearMoose](https://wordpress.org/support/users/nuclearmoose/)
 * (@nuclearmoose)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/specific-category-styles/#post-91528)
 * You may find some help in [these posts](http://www.google.ca/search?hl=en&ie=UTF-8&q=site%3Awordpress.org+style+categories).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Specific category styles’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [NuclearMoose](https://wordpress.org/support/users/nuclearmoose/)
 * Last activity: [21 years, 11 months ago](https://wordpress.org/support/topic/specific-category-styles/#post-91528)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
