[wp-trac] [WordPress Trac] #18106: get_terms of posts in a specific post_type
WordPress Trac
noreply at wordpress.org
Sun Sep 11 01:13:37 UTC 2016
#18106: get_terms of posts in a specific post_type
-------------------------------+----------------------
Reporter: braydonf | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Taxonomy | Version:
Severity: normal | Resolution: wontfix
Keywords: close needs-patch | Focuses:
-------------------------------+----------------------
Changes (by boonebgorges):
* status: reopened => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
Replying to [comment:11 wordpresssites]:
> How about adding a 'post_type' and 'category' argument to `get_tags()`
or `get _terms()` or `get_categories` so tags can be listed for different
post types or categories? The only way to do that now is to use the
include or exclude parameters.
The technical explanation for 'post_type' can be found [comment:7 in my
comment above]. I'm not sure what 'category' would mean in this context:
show all tags that belong to posts that are also in a given category? That
kind of query would be even *more* resource-intensive than the 'post_type'
query - I think that about 7 database tables would be involved. That kind
of use case is specific enough that I think that a custom implementation
using 'include' is probably the most appropriate.
I'm going to close this ticket again, as I think that the reasoning from
comment 7 still stands. If anyone is able to work up a way of handling
this so that it has a reasonable chance of scaling, please feel free to
reopen with those details.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/18106#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list