Well that turned out to be fairly easy. Here’s the code, hope it helps someone:
To get items that have a date set in the future, make this WP_Query, where event_start_date is your custom field.
$meta_query = array( array( 'key' => 'event_start_date', 'value' => date('Ymd'), 'type' => 'DATE', 'compare' => '>=' ) ); $args = array( 'post_type' => 'post', 'posts_per_page' => $posts_per_page, 'order' => 'DESC', 'orderby' => 'meta_value_num', 'meta_key' => 'event_start_date', 'offset' => (max(1, get_query_var('paged')) - 1) * $posts_per_page, 'meta_query' => $meta_query );
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!