title: How do I use a tax_query and a meta_query in wordpress succesfully?
body: <p>This is the code I am using:</p>
  <pre><code>$results = array(
                  'post_type' =&gt; 'score',
                  'tax_query' =&gt; array(
                      array(
                          'taxonomy' =&gt; 'competitions',
                          'field' =&gt; 'slug',
                          'terms' =&gt; $tax-&gt;slug,
                          'compare' =&gt; '='
                      )
                  ),
                  'meta_query' =&gt; array(
                      array(
                          'numberposts'   =&gt; -1,
                          'post_type' =&gt; 'score',
                          'meta_key'     =&gt; 'horse_name',
                          'meta_value'   =&gt; $horsename,
                          'compare' =&gt; 'LIKE'
                      )
                  )
             );
  
  // query
  $the_query = new WP_Query($results);
  </code></pre>
  <p>The problem is I can't work out how to make a Boolean AND expression so that both the taxonomy and the custom field should match before returning a post.</p>