delarge
11/16/2017 - 4:29 PM

Wp Query with ACF checkbox

 <?php
 // args
 $args = array(
 	'posts_per_page' => 1,
 	'post_type' => 'post',
 	'order' => 'DESC',

  'meta_query' => array(
		array(
			'key' => 'featured_post',
			'compare' => '==',
			'value' => '1'
		)
	)
 );

 	$the_query = new WP_Query( $args ); ?>

 	<?php if ($the_query->have_posts()) : while ($the_query->have_posts()) : $the_query->the_post(); ?>

    <?php get_template_part('_blog-post-header'); ?>

 <?php endwhile; endif; wp_reset_postdata(); ?>