[wp-trac] [WordPress Trac] #39372: Allow count for wp_terms query to count other post statuses as well as published posts
WordPress Trac
noreply at wordpress.org
Thu Dec 22 16:51:56 UTC 2016
#39372: Allow count for wp_terms query to count other post statuses as well as
published posts
-----------------------------+-----------------------------
Reporter: roperjonathan | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.7
Severity: normal | Keywords:
Focuses: performance |
-----------------------------+-----------------------------
While it is great to use the wp_terms query to get the terms, when
counting the number of posts assigned to each of these terms, it would be
great if there was a way to be able to include the number of posts that
have other post statuses and not just count the number of posts that have
been published.
At the moment if I want to do this, I have to return all of the terms from
a taxonomy and then go through each one and count how many posts are
associated with each term for both published posts and draft posts which
is a lot more inefficient.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39372>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list