Make WordPress Core

Opened 5 years ago

Closed 2 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:


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:

I'm not sure if this is a bug or not. Can someone you look into this for me please.



Change History (3)

#1 @dlh
4 years ago

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()`.

#2 @jbpaul17
4 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.

#3 @boonebgorges
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

As noted above, this is how hierarchical taxonomies are intended to work.

Note: See TracTickets for help on using tickets.