WordPress

show page if a checkbox value is checked

 'page',
'posts_per_page' => 4,
'meta_query' => array(
array(
'key' => 'display', // name of custom field
'value' => 'yes', // matches exaclty "yes"
'compare' => 'LIKE'
)
)
);
$the_query = new WP_Query( $args );
?>
have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>