title: the orderby query does not work for custom fields even with meta query
body: <p>I have written the following query to fetch a list and want to show the list of names in ascending order.</p>
  
  <p>i was earlier trying to pass meta_key and meta_value as arguments but it wouldnt give the sorting correctly.</p>
  
  <p>after trying <strong>meta_query</strong> i am still stuck with the same problem.
  let me know how i can go about it thanks.  </p>
  
  <pre><code>$connected = new WP_Query( array(
  
                      'connected_type' =&gt; 'posts_to_pages',
  
                      'connected_items' =&gt; get_queried_object(),
  
                      'nopaging' =&gt; true,
  
                      'post_type' =&gt; 'attorney',
  
                      'attorney_category'=&gt; 'partner',
  
                      'post_status' =&gt; 'publish',
  
                      'posts_per_page' =&gt; -1,
  
                      'caller_get_posts'=&gt; 1,
  
                      'orderby' =&gt; 'order_clause',
  
                      'order' =&gt; 'ASC',
  
                      'meta_query' =&gt; array(
                          'order_clause' =&gt; array(
                              'key' =&gt; 'Last name',
                            )
                          )
                      ) );
  </code></pre>
  
  <p>The following is the error i get when i print the query result.</p>
  
  <p><a href="https://i.stack.imgur.com/xxmZY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xxmZY.png" alt="enter image description here"></a></p>