<?php $the_query = new WP_Query( $args ); ?> <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <div class="review-content"> <?php include('stars-main.php'); ?> <label class="highly"> <?php if( get_field('main_review') == '5') : ?> Highly likely to recommend <?php endif; ?> <?php if( get_field('main_review') == '4') : ?> Likely to recommend <?php endif; ?> <?php if( get_field('main_review') == '3') : ?> Might recommend <?php endif; ?> </label> <br> <ul class="review-metadata"> <li><?php the_title(); ?></li> <li><?php the_field('short_description'); ?></li> <li> <?php if( get_field('primary_point_of_contact') ): ?> <li><?php the_field('primary_point_of_contact'); ?></li> <?php endif; ?> </li> </ul> <div class="reviews-sub-ratings"> <ul class="ratings"> <li><span class="ratings-col">Local knowledge:</span> <?php include('stars-local.php'); ?></li> <li><span class="ratings-col">Process expertise:</span> <?php include('stars-process.php'); ?></li> <li><span class="ratings-col">Responsiveness:</span> <?php include('stars-respo.php'); ?></li> <li><span class="ratings-col">Negotiation skills:</span> <?php include('stars-nego.php'); ?></li> </ul> </div> <div class="review-body"> <?php the_field('review'); ?> </div> </div> <?php endwhile; else: echo 'No reviews yet.'; endif; ?> <?php wp_reset_postdata(); ?>