'xarxaprod-convo',
'posts_per_page' => '3',
'order_by' => 'meta_value', //order by meta value
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'order' => 'ASC', //order ascendent
'meta_query' => array(
'query_convo_apply_end' => array( //filter results show today and later
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>=', //show events today and later
'type' => 'DATE',
),
'query_convo_espai_associat' => array( //filter convos with relation to espai associat
'key' => 'xxp_convo_espai_associat', // name of the custom field
'value' => '"' . get_the_ID() . '"', // in ACF select Return format "Post ID"
'compare'=> 'LIKE', // matches exaclty "123", not just 123. This prevents a match for "1234"
),
'orderby' => array (
'query_convo_apply_end' => 'ASC',
),
)
)
);
?>
'xarxaprod-convo',
'posts_per_page' => '3',
'order_by' => 'meta_value', //order by meta value
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
'order' => 'ASC', //order ascendent
'meta_query' => array(
array( //filter results show today and later
'key' => 'xxp_convo_apply_end',
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
'compare' => '>=', //show events today and later
'type' => 'DATE',
),
),
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
'orderby' => 'meta_value', //order by meta value
'order' => 'ASC', //order ascendent
)
);
?>
have_posts() ) : ?>
have_posts() ) : $convos_query->the_post(); ?>
No convos