How to make a condition to output the records to wordpress?

There is a series of output records(donations) plug-watering
You want to display only those records where the fee is not finished.
Over or not over the fee is determined by the condition

<?php if(!$value->is_finished) { ?><?php }?>

I do not understand as a loop to check this condition and print these records.

<?php $query = getCarouselCampaning();?>

 $k = 0;
 foreach ($query->posts as $key=>$value){
 if ($k == 0){
 $active = "active";
 } else {
 $active = "";

 <div class="item <?=$active?>" >
 <div class="row">
 <div class="col-md-5">
 <?php echo get_the_post_thumbnail($value->ID, 'full'); ?>
 <div class="col-md-7">
 <?php echo do_shortcode being('[leyka_scale id='.$value->ID.' show_button=1]'); ?>

 } ?>
March 12th 20 at 08:41
0 answer

Find more questions by tags WordPress