Forums

Display specific category template for posts (3 posts)

  1. tkhobbes
    Member
    Posted 9 months ago #

    Hi all

    A very simple question - I have three main categories on my blog - with some subcategories each.

    I have created 3 category templates, thus - 1 for each main category.

    What I want to achieve is
    1) when a sub-category page is displayed, the template for it's main-category is used
    2) when a specific post is displayed, the template for it's main category is displayed

    So - if I have "main-cat 1" with "sub-cat-1a" - when displaying the "sub-cat-1a" page, it should actually use the "main-cat 1" template.

    And when displaying a post that is in "sub-cat-1a" or one that is in "main-cat 1", again it should be displayed using the "main-cat 1" template.

    How do I achieve this?

    Thanks!

    thomas

  2. MichaelH
    moderator
    Posted 9 months ago #

  3. tkhobbes
    Member
    Posted 9 months ago #

    Thanks - the first bit is exactly what I need. I will make sure to have only 1 level of subcategories to have it work.

    However, about the second one, this is a great start, but unfortunately not exactly what I need... is there really no possibility in displaying the template of a parent category for any given post?

Reply

You must log in to post.

About this Topic