This is how I got it to work, but it seems there should be an easier way?
$event_query = new WP_Query( array( 'post_type' => 'al_event', 'orderby' => 'menu_order', 'order' => 'ASC', 'meta_query' => array( array( 'key' => 'event_date_end', 'compare' => '>=', 'value' => $today, ), array( 'key' => 'event_date', 'compare' => '<=', 'value' => $future, ), array( 'relation' => 'OR', array( 'key' => 'hide_on_public_page', 'value' => '0' ), array( 'key' => 'hide_on_public_page', 'compare' => 'NOT EXISTS', ) ) ), ) );
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!
© 2022 Advanced Custom Fields.