WordPress.org

Ready to get started?Download WordPress

Forums

different single post page for different category (2 posts)

  1. aliallen
    Member
    Posted 7 years ago #

    I have posts that are in more than one category. I have different category templates for each of the categories. This works for the category pages. I also have a statement that says that if the post is in a specific category, use a specific single post page (single1, single2, etc.). The problem is - when I click on the permalink on the category page for a post that is in more than one category, it doesn't display the correct single post template. For example, a post in Awards category and Agriculture category is supposed to display using a different single post template, depending on the category. How do I make sure that the category that calls the post also calls the correct single post template? Thanks.

  2. moshu
    Member
    Posted 7 years ago #

    So, if a post is in multiple categories - which one is the "correct" cat template to use?
    If you can come up with the answer - somebody might be able to help you.

    I don't know how does it work with multiple categories, but in less complicated cases I always recommend Kaf's excellent plugin:
    http://guff.szub.net/2005/07/21/post-templates-by-category/

Topic Closed

This topic has been closed to new replies.

About this Topic