Home › Forums › ACF PRO › True/False – No Value for False › Reply To: True/False – No Value for False
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 use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.