Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#51517 new defect (bug)

Allow post statuses other the `publish` to be included in term counts.

Reported by: peterwilsoncc Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords:
Focuses: Cc:


Currently term counts only allow for the post status publish to be included. As WordPress allows for custom public post statuses, it would be handy to be able to include them as in the count.

I can see multiple approaches:

  • A filter to allow developers to modify countable statuses
  • An argument when registering custom statues to indicate it's countable
  • An argument when registering custom taxonomies to indicate the statuses that are countable
  • None or the above/another approach

Change History (1)

#1 @jeremyfelt
3 months ago

I ran into this today (again) and wondered if there was a Trac ticket already. Only a couple days old! :)

Very much a +1 overall.

My immediate thought was to add a filter to _update_post_term_count() though I'd also be on board with an argument on register_taxonomy().

Note: See TracTickets for help on using tickets.