title: How to retrieve comments from WordPress posts in a given taxonomy?
body: <p>I am trying to write some code in my plugin which displays only comments for posts which have a specific value set for a custom taxonomy. My set up is:<br>
  Custom post type - Object<br>
  Custom taxonomy - Sources<br>
  Example value - ABC Museum</p>
  
  <p>Commenting is enabled for Objects
  I can retrieve comments by user and by each custom post</p>
  
  <p>I have tried:</p>
  
  <pre><code>$meta_query = array('key' =&gt; 'sources',  'value' =&gt; 'ABC Museum');
  $args = array(
      'number' =&gt; 5,
      'post_type' =&gt; 'Object',
      'meta_query' =&gt; array($meta_query)
  );
  $comments_query = new WP_Comment_Query;
  $comments = $comments_query-&gt;query( $args );
  </code></pre>
  
  <p>but this returns an empty array. Is this just a silly syntax error on my part, or have I misunderstood the use of meta_query and it won't work for custom taxonomies and custom post types?</p>
  
  <p>Looking at <a href="http://pippinsplugins.com/querying-comments-with-wp_comment_query-and-meta-query-in-3-5/" rel="nofollow">http://pippinsplugins.com/querying-comments-with-wp_comment_query-and-meta-query-in-3-5/</a> I think it may be the latter - the meta has to be related to the comment, not teh post that it was added to, is that correct? Unfortunately <a href="http://codex.wordpress.org/Function_Reference/get_comments" rel="nofollow">http://codex.wordpress.org/Function_Reference/get_comments</a> is rather thin on details and examples!</p>
  
  <p>Thanks</p>