title: In Wordpress, how to order by custom field when there is more than one custom field in the query?
body: <p>I am editing an existing Wordpress theme that uses custom fields in a custom query. I need to edit the query so that the results are filtered by one custom field, and ordered by a second custom field.</p>
  
  <p>This is what I have attempted so far:</p>
  
  <pre><code>&lt;?php
  $query_args = array();
  $query_args['post_type'] = 'woo_estate';
  $query_args['meta_query'] = array(
      array(
          'key' =&gt; 'on_show',
          'value' =&gt; 'true'
      ),
      array(
          'key' =&gt; 'price',
          'type' =&gt; 'numeric',
      )
  );
  $query_args['orderby'] = 'price';
  $query_args['order'] = 'ASC';
  
  $query_args['posts_per_page'] = $woo_options['woo_more_entries'];
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  $query_args['paged'] = $paged;
  
  ?&gt;
      &lt;?php query_posts(  $query_args ); ?&gt;
  </code></pre>
  
  <p>The problem is that the results continue to be ordered by the default (date) instead of by the <code>price</code> custom field.</p>
  
  <p>How do I get this query to order by the custom price field?</p>