Is there an easy way to query for any posts that is tagged with any term from a particular taxonomy?

I know this technique:

$custom_taxonomy_query = new WP_Query( 
 array(
  'taxonomy_name' => 'term_slug',
 )
);

But I would like to either pass a wildcard in place of term_slug, or perhaps just an empty string. Then that would give me all posts that are tagged by any term in that taxonomy, not just one specific term.

Thanks for your help,
Dave

5

In retrospect, I’ve did a mashup of MikeSchinkel and t31os suggestion. It’s possible to inject that to existing queries on the fly, but it needs WordPress 3.1:

Plugin to get an RSS Feed for posts containing any term from a taxonomy.

Leave a Reply

Your email address will not be published. Required fields are marked *