Hi guys, I’m working with archive.php to display posts within a certain category but NOT the posts within any of the sub-categories (or category children as it were).
So basically, it looks like this:
When viewing Maincat, I want only the posts in that category to be displayed, not the posts in Subcats.
The standard query_posts ‘&cat=-id1,-id2’ doesn’t actually exclude the subcats, as they seem to be fed simply because I’m viewing the parent category.
Any idea how I can get around this and still get a properly paged category archive listing?
I don’t want to have to manually check each result in The Loop to see if it’s in the subcats, because that will affect the number of results displayed, and screw up pagination.
Any help would be greatly appreciated.
- The topic ‘Archive Subcat Exclusion – The RIGHT way?’ is closed to new replies.