Unfortunately this did not have any real effect.
$args = array( 'post_type' => 'work', 'post_status' => 'publish', 'posts_per_page' => -1, 'order' => DSC, 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'exclude_project', 'value' => '0', 'compare' => '=' ), array( 'key' => 'exclude_post', 'compare' => 'NOT EXISTS' ) ), );
I still see all my posts. The ones with a value if 1 are still showing up in my query
$query = new WP_Query( $args ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); get_template_part( 'template-parts/content', 'work' ); endwhile; wp_reset_postdata(); else: get_template_part( 'template-parts/content', 'none' ); endif;
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!
We've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.