Opened 8 years ago
Closed 6 years ago
#37967 closed defect (bug) (invalid)
Categories Problem - possible bug.
Reported by: | trader121 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | Taxonomy | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Hi Guys, I have a problem with my categories in that if I list a post in a sub category, it also lists the post in the main category above it, even though I haven't selected it.
I have deactivated plugins one by one and cleared the cache after each but the problem is still there. I searched the forum for an answer to this and received some possible answers but I have been unable to find a solution.
Please see my forum post here:
https://wordpress.org/support/topic/posts-in-subcategories-only/#post-8154156
I'm not sure if this is a bug or not. Can someone you look into this for me please.
Thanks,
James.
Change History (3)
#2
@
7 years ago
- Keywords reporter-feedback added
@trader121 please see @dlh's previous comment about this being expected functionality. From my view, your options appear to be finding a plugin that alters this functionality or changing this Trac ticket from a defect to an enhancement. I suspect you may find faster resolution going the route of a plugin, but I'll leave that decision to you.
Hey @trader121,
What you're describing sounds to me like expected behavior. Queries for terms in hierarchical taxonomies (like
category
) include child terms by default, per `WP_Tax_Query::__construct()`.