How can I get posts in a subcategory to display on it’s parent categories archive page?

Currently when you display an archive category page, it only displays it for the main parent, and doesn’t display any of the posts that may be in the subcategories under it’s parent.

How can I alter it so that for every category archive it will display all posts under it, including the subcategory posts?

2 Answers
2

I ran another test and unless I’m loosing my mind child categories are definitely displayed on the category archive page in WordPress v3.0.1 (is that the version you are running, or are you on an earlier version?)

Here are two screenshots, the first showing the category layout for my test install:

WordPress Categories Admin Page showing Parent, Child and Grandchild Categories
(source: mikeschinkel.com)

The next screenshots is the category archive page for my test install showing three posts, each with one category selected; the Parent, the Child and the Grandchild category, respectively.:

WordPress Categories Listing Page showing posts from Parent, Child and Grandchild Categories
(source: mikeschinkel.com)

So I’m 95% certain you have a plugin or some other code that is disabling your subcategories from displaying on your archive page. Can you add the list of plugins you are using to your question content?

Leave a Comment