Home › Forums › General Issues › ACF posts orderby not working correct › Reply To: ACF posts orderby not working correct
Yes, in order to sort y a meta cay you need to use that field for meta_key. Should have seen this but I missed it. In order to sort by your time field but select posts based on
'meta_key' => 'contest_route',
'meta_value' => 'route_small',
you’re going to need to use a meta_query rather than the above for contest_route. meta_query is an array. Look at the meta_query section of https://codex.wordpress.org/Class_Reference/WP_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.