If last post then add class end to grid.
} else {
$image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_parent), 'glm-block-image');
}
+ if (($parent->current_post +1) == ($parent->post_count)){
+ $end = ' end ';
+ } else {
+ $end = '';
+ }
?>
- <div id="<?php the_ID(); ?>" class="text-center small-12 medium-4 columns large-text-left glm-block">
+ <div id="<?php the_ID(); ?>" class="text-center small-12 medium-4 columns large-text-left glm-block<?php echo $end;?>">
<a class="glm-block-image" href="<?php echo get_permalink($id); ?>"><img src="<?php echo $image_data[0]; ?>" /></a>
<a class="glm-block-title" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><h1><?php the_title(); ?></h1></a>
</div>