Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion inc/views/partials/excerpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ private function get_excerpt( $length = 25, $post_id = null ) {
}

if ( has_excerpt() ) {
return apply_filters( 'the_excerpt', get_the_excerpt( $post_id ) );
$excerpt_more = apply_filters( 'excerpt_more', ' […]' );
$content = wp_trim_words( get_the_excerpt( $post_id ), $length, $excerpt_more );
Comment thread
girishpanchal30 marked this conversation as resolved.

return apply_filters( 'the_excerpt', $content );
}

add_filter( 'excerpt_length', array( $this, 'change_excerpt_length' ), 10 );
Expand Down
Loading