Post appearing in category archive when it shouldn’t
-
In over a decade of working with WordPress, I’ve never seen this issue happen… a post is showing up on the category archive page of a category it’s not categorized in.
For context (I’d link if the site were public): post is of a custom post type (rulings), and has the ID 343. The two categories it is in have IDs of 9004 and 806, with 9004 being the parent of 806. The category where the post is incorrectly appearing in is 9008. I checked wp_term_relationships and wp_term_taxonomy, and neither shows 9008 being associated with any of the other IDs.
And yes, it persists with all plugins disabled.
It appears that category 806 is the issue, as adding that category to other posts make them show on 9008, and removing that category from 343 removes it from the category. However, if I view the category via API (/wp-json/wp/v2/rulings?categories=9008), everything looks fine – no post 343 regardless of the presence of 806.
Any ideas?
The topic ‘Post appearing in category archive when it shouldn’t’ is closed to new replies.