[wp-hackers] limiting tag clouds to custom post type

Joshua Sibelman joshua.sibelman at gmail.com
Tue Jun 7 17:36:45 UTC 2011


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:
http://wordpress.stackexchange.com/questions/14331/get-terms-by-taxonomy-and-post-type

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?

Thanks,
Josh



More information about the wp-hackers mailing list