How do you use orderby with meta_query in WordPress?

Posted by Prem Tiwari | Updated on

The new meta_query array selects which posts the query returns. So yes, you are indicating the ‘key’ within that meta_query, but you can still use the old method of:

in addition to the meta_query, as these lines indicate how to sort the resulting query. So yes, you might indicate the same meta_key twice.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers