Specific category styles (3 posts)

  1. satoshi
    Posted 10 years ago #

    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.

  2. lbessant

    Posted 10 years ago #

    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....

  3. NuclearMoose
    Posted 10 years ago #

    You may find some help in these posts.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.