if( $the_post->post_excerpt ){
$the_excerpt = $the_post->post_excerpt;
} else {
- $the_excerpt = apply_filters('the_content', $the_post->post_content);
- }
+ $the_excerpt = $the_post->post_content;
+ }
+
$excerpt_length = $length; //Sets excerpt length by word count
$the_excerpt = strip_tags(strip_shortcodes($the_excerpt)); //Strips tags and images
$words = explode(' ', $the_excerpt, $excerpt_length + 1);
-
+
if(count($words) > $excerpt_length) :
array_pop($words);
- array_push($words, '…');
+ array_push($words, '');
$the_excerpt = implode(' ', $words);
endif;
+
return $the_excerpt;
}
?>
<div class="front-page-post-content-container overlay">
<h2 class="title-posts"><a href="<?php echo $block->url; ?>"><?php echo $block->post_title; ?></a></h2>
<div class="glm-block-content">
- <?php content_excerpt($block->ID) . $block->post_excerpt;?>
+ <?php echo content_excerpt($block->ID, 20) . $block->post_excerpt;?>
<?php if($block->url) { ?>
<a class="glm-block-readmore" href="<?php echo $block->url;?>">...More content at this link</a>
<?php } ?>