My Homepage Loop
div class="row no-gutters">
<?php
// Testimonial single Looop
$testimonial_loop = array(
'numberposts' => -1,
'post_type' => 'testimonial',
'showposts' => '4',
);
// Start testimonial Loop
$the_query = new WP_Query( $testimonial_loop ); ?>
<?php if( $the_query->have_posts() ): ?>
<?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class="col-xs-12 col-md-3 row no-gutters ">
<a href="<?php the_permalink(); ?>">
<!-- Get persons thumb and display it in the background -->
<div class="col-xs-6 col-md-12 feedperson" style=" background:url(<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>) center ; background-position: center !important;">
</div>
<div class="col-xs-6 col-md-12 feedpersontitle shade15" >
<span class="spacer30"></span>
<h2 class="text-center"><?php the_field('name'); ?></h2>
<h4 class="text-center"><?php the_time('F j, Y'); ?></h4>
</div>
</a>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); // End testimonial loop. Restore global post data stomped by the_post(). ?>
</div>