WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] questions about category template and parent/child categories (2 posts)

  1. csleh
    Member
    Posted 5 years ago #

    If a post has more than one category, I believe the first category shows. What if the categories are subcategories?

    For example:

    - fruit main category
    - oranges sub category
    - apples sub category
    - red apples sub category
    - macintosh sub category
    - gala sub category
    - green apples sub category
    - granny smith

    If I have a category template for fruit, would a post in the category "gala" show when listing all posts?

    If I have a category template for red apples, can I show the apples parent category, the green apples sibling category (as links) along with the macintosh and gala subcategories?

    Should the post only be in one category -- for instance only in "granny smith" but not "fruit"?

    The deeper this site gets the more confused I get. THanks!

  2. MichaelH
    Member
    Posted 5 years ago #

    If I have a category template for fruit, would a post in the category "gala" show when listing all posts?

    Not sure what your are asking, especially with 'all posts', but I believe yes is the answer. Easy enough to test--just use the WordPress Default Theme and click on a parent category to see the results.

    If I have a category template for red apples, can I show the apples parent category, the green apples sibling category (as links) along with the macintosh and gala subcategories?

    Child categories don't 'inherit' the template used for parent categories. You might want to look at this plugin:
    http://wordpress.org/extend/plugins/elevate-parent-category-template/

    Should the post only be in one category -- for instance only in "granny smith" but not "fruit"?

    Only the last descendant should be assigned a post in a particular hierarchy.

Topic Closed

This topic has been closed to new replies.

About this Topic