Home › Forums › General Issues › using both published date and date picker to sort posts › Reply To: using both published date and date picker to sort posts
turns out it needed to be post_date instead of simply date, this is the working code.
case 'concertdatum': $wp_query_args['meta_query'] = array( 'datum_clause' => array('key' => 'datum','compare' => 'EXISTS') ); $wp_query_args['orderby'] = array('datum_clause' => 'DESC', 'post_date' => 'DESC'); break;
For some odd reason however, the mega menu that my theme uses refuses to sort the posts like I request it to, but that’s a different question not for this site 😉
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!