Support

Account

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;