<?php
/**
* Function to display post excerpt/content with limited words on listing page. calling echo apply_filters('the_content', post_excerpt(20));
* @global type $post
* @param type $word_count
* @return type string
*/
function post_excerpt($word_count = 15) {
return wp_trim_words(get_the_excerpt(), $word_count);
}
// Changing excerpt more
function post_excerpt_more($more) {
$more = '...';
return $more;
}
add_filter('excerpt_more', 'post_excerpt_more');