Get terms by taxonomy AND post_type

Question

I have 2 custom post types ‘bookmarks’ and ‘snippets’ and a shared taxonomy ‘tag’. I can generate a list of all terms in the taxonomy with get_terms(), but I can’t figure out how to limit the list to the post type. What I’m basically looking for is something like this:

get_terms(array('taxonomy' => 'tag', 'post_type' => 'snippet'));

Is there a way to achieve this? Ideas are greatly appreciated!!

Oh, I’m on WP 3.1.1

0
Gavin Hewitt 4 months 0 Answers 19 views 0

Leave an answer