ACF true/false question

Hi, I want to make it so that posts in the post-type “offers” that have a true/false field set to true is excluded from the loop. However I can not wrap my head around how I would incorporate the code that ACF gives me here with my code below. Can someone help me? I guess I have to use the “meta_query” they are showing, but how?

<?php
    $args = array(
        'post_type' => 'offers'
    );
    $the_query = new WP_Query( $args );
?>
<?php if ( have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

	...........

<?php endwhile; endif; ?>

EDIT: nevermind, this worked:

    $args = array(
        'post_type' => 'offers',
        'posts_per_page' => 1,
        'meta_query' => array(
            array(
                'key' => 'big',
                'value' => '1',
                'compare' => '=='
            )
        )
    );

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.