Make WordPress Core

Opened 12 years ago

Last modified 5 years ago

#21396 new defect (bug)

Categories widget reports categories without posts when they have custom posts

Reported by: pkwooster's profile pkwooster Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: Widgets Keywords: needs-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

This problem may be related to #14084, but this report is specific to the behaviour of the Categories Widget.

  • Create a custom post type eg. "Products"
  • Create a category eg. "Photographs"
  • Add some posts of type Products, assign them to category Photographs
  • go to the blog page and the Categories widget lists Photographs as a category
  • click on Photographs
  • the "Nothing Found" post is shown.

There are no normal posts of category Photographs, but the widget lists a category that returns nothing. I would have expected the widget not to list a category that has no normal posts.

Change History (3)

#1 @dd32
12 years ago

Also similarily related to #14084 is #14073 which describes this same problem.

tl;dr: Term post counts are global to Post Types and Post Statuses, this is a limitation of the existing storage mechanism, and there isn't much we can do until we add Term Meta #10142

#2 @SergeyBiryukov
12 years ago

  • Description modified (diff)

#3 @chriscct7
9 years ago

  • Keywords needs-patch added
  • Version changed from 3.4.1 to 3.4
Note: See TracTickets for help on using tickets.