<?php
$lastposts = get_posts( $args );
$count = 0;
-foreach($lastposts as $posts) : setup_postdata($posts); ?>
+foreach($lastposts as $post) : setup_postdata($post); ?>
<div class="home-feed-post text-center small-12 medium-4 columns medium-text-left block" data-equalizer-watch>
<div class="row">
- <?php if (has_post_thumbnail( $posts->ID )) { ?>
- <?php echo get_the_post_thumbnail($posts->ID, 'glm-block-image', array('class' => 'blog-excerpt-img-wrap')); ?>
+ <?php if (has_post_thumbnail( $post->ID )) { ?>
+ <?php echo get_the_post_thumbnail($post->ID, 'glm-block-image', array('class' => 'blog-excerpt-img-wrap')); ?>
<div class="small-12 medium-12 columns home-feed-post-content">
<?php } else { ?>
<div class="small-12 columns home-feed-post-content">
<?php } ?>
- <h6 class="title-posts"><a href="<?php the_permalink($posts->ID); ?>"><?php the_title(); ?></a></h6>
+ <h6 class="title-posts"><a href="<?php the_permalink($post->ID); ?>"><?php the_title(); ?></a></h6>
<div class="excerpt<?php echo $count ?>"><?php echo the_advanced_excerpt('length=265&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=a,img,p,strong,h1,h2,h3,hr,div'); ?></div>
</div>
</div>
<?php $count++; ?>
<?php endforeach; ?>
+<?php wp_reset_query(); ?>
</div>