Support

Account

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 😉