Support » Fixing WordPress » 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)
  • 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….

    You may find some help in these posts.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Specific category styles’ is closed to new replies.