Home › Forums › General Issues › Query Posts by One Custom Field and 'orderby' Another Custom Field › Reply To: Query Posts by One Custom Field and 'orderby' Another Custom Field
Yes, you will need to add a meta_query to do this.
There was a new feature added in WP4.2 that would allow you to do this.
And you’ll need to query by the field you are ordering by as well. See the city_clause example.
https://make.wordpress.org/core/2015/03/30/query-improvements-in-wp-4-2-orderby-and-meta_query/
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.