diff --git a/inc/views/partials/excerpt.php b/inc/views/partials/excerpt.php index 8ed1ea284b..0f2f2501ad 100644 --- a/inc/views/partials/excerpt.php +++ b/inc/views/partials/excerpt.php @@ -75,8 +75,11 @@ private function get_excerpt( $length = 25, $post_id = null ) { return apply_filters( 'the_content', get_the_content( null, false, $post_id ) ); } - if ( has_excerpt() ) { - return apply_filters( 'the_excerpt', get_the_excerpt( $post_id ) ); + if ( has_excerpt( $post_id ) ) { + $excerpt_more = apply_filters( 'excerpt_more', ' […]' ); + $content = wp_trim_words( get_the_excerpt( $post_id ), $length, $excerpt_more ); + + return apply_filters( 'the_excerpt', $content ); } add_filter( 'excerpt_length', array( $this, 'change_excerpt_length' ), 10 );