[wp-hackers] limiting tag clouds to custom post type
otto at ottodestruct.com
Tue Jun 7 18:05:13 UTC 2011
Post types are part of the posts themselves. So you have to query
against the posts table.
The only "efficient" way to do it is going to be with a custom SQL
query. Join the posts table with term_relationships, term_taxonomy,
and terms, selecting based on the custom post type.
On Tue, Jun 7, 2011 at 12:36 PM, Joshua Sibelman
<joshua.sibelman at gmail.com> wrote:
> I've been looking for a way to generate a tag cloud limited specifically to a custom post type, but there doesn't seem to be a built-in method for doing this.
> I found this:
> But this seems to me to be incredibly inefficient since it's getting all the posts of the custom type from the database, then querying the database for each post to get its respective taxonomy.
> Has anyone here attempted to figure out a means of doing the same thing that's more efficient?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers