Support

Account

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