wordpress - WP get posts with 2 condition -


i have custom post type 2 conditions :

first : acf field start date

secondly : acf field empty

i have first, list ordered "start date" (acf field) , secondly list ordered publication date.

when using get_posts, first condition works :

            $args_infos = array(                 'numberposts' => -1,                 'post_type' => 'infos',                 'tax_query' => array(                     array(                         'taxonomy' => 'emetteur',                         'field' => 'term_id',                         'terms' => 132,                         'operator' => 'not in', //to hide expired posts                     )                 ),                 'meta_key' => 'start_date', //the reason why, posts start date showing                 'meta_type' => 'date',                 'orderby' => 'meta_value',                 'order' => 'asc',                 'post_status' => 'publish'             ); 

any idea ?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -