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();?>

<?php
 $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>
 <div class="col-md-7">
<span><h3><?=$value->post_title?></h3></span>
<p><?=$value->post_excerpt?></p>
 <?php echo do_shortcode being('[leyka_scale id='.$value->ID.' show_button=1]'); ?>
</div>
</div>

</div>
 <?php 
$k++;
 } ?>
March 12th 20 at 08:41
0 answer

Find more questions by tags WordPress