Forums

adding is_category to single.php (4 posts)

  1. rebekahford
    Member
    Posted 6 months ago #

    Hi

    I have 3 different post categories that I'm using to filter information on a site that I'm building: project, news and events.

    I need to display the single post differently for each type of category with different things in the sidebar. Up until now I've been using the single post template plugin which works great but I was wondering whether there's a way to use a conditional if (is_category('n')) in the single.php somehow so that I don't have to write a different template for each and more importantly my client doesn't have to assign a template to their posts each time they write one.

  2. alchymyth
    The Sweeper
    Posted 6 months ago #

  3. rebekahford
    Member
    Posted 6 months ago #

    Yes I'm well aware of the codex as I've been developing WordPress sites for many years. I just need to know if there's a way around this

  4. rebekahford
    Member
    Posted 6 months ago #

    I'll try in_categiry though as this might work

Reply

You must log in to post.

About this Topic