I have been trying for hours, I don't get my query to work: display only posts (from custom post type) with a field (Advanced Custom Fields date picker) value that is more than today.
echo date('d-m-Y');
prints the same date format as the posts output the_field('datum_event');
: 06-01-2019
$args = array(
'post_type' => 'agenda',
'meta_query' => array(
array(
'key' => 'datum_event',
'value' => '06-01-2019',
'compare' => '>='
)
),
);
$loop = new WP_Query( $args );
What is missing?
'type' => 'DATE',
to the most inner array