title: Query posts by custom taxonomy ID
body: <p>I have a custom post type called <code>portfolio</code> and a custom taxonomy called <code>build-type</code> (acting as categories)</p>
  
  <p>I am trying to query <code>portfolio</code> posts by <code>build-type</code> ID e.g. all Portfolio posts in "Hotels" (id=4 for that taxonomy)</p>
  
  <pre><code>// gets the ID from a custom field to show posts on a specific page   
  $buildType = get_post_meta($post-&gt;ID, 'build_type_id', true);
  // run query
  query_posts(array( 
      'post_type' =&gt; 'portfolio',
      'showposts' =&gt; -1,
      'tax_query' =&gt; array(
          'taxonomy' =&gt; 'build-type',
          'terms' =&gt; $buildType,
          'field' =&gt; 'term_id'
      ),
      'orderby' =&gt; 'title',
      'order' =&gt; 'ASC'
  ));
  </code></pre>
  
  <p>Currently it's calling <strong>all</strong> <code>portfolio</code> posts and not just those with the <code>build-type</code> ID</p>
  
  <p>For <code>'field' =&gt; 'term_id'</code> should I be using <code>term_id</code>, <code>tag_ID</code>, <code>id</code> or something else?</p>
  
  <p>Anyone know how to get this working?</p>
  
  <p>Thanks in advance!</p>