Cutting off excerpt with first sentence

by Rada Wilinofsky   Last Updated November 18, 2017 01:08 AM

I'm trying to end my excerpts with the first sentence. I had attempted the solutions I found on this website, including each function + add_filter from these posts:

How to end the excerpt with a sentence rather than a word?


End excerpt at the end of the sentence

It hasn't worked. I had checked that the filter is applied by adding the function:

function print_filters_for( $hook = '' ) {
global $wp_filter;
if( empty( $hook ) || !isset( $wp_filter[$hook] ) )

print '<pre>';
print_r( $wp_filter[$hook] );
print '</pre>';

and calling it on the templates. It shows up. I had tried switching the order that it's applied with the generic wp_trim_excerpt by adding the $priority argument, but it doesn't make the difference: excerpts are still trimmed by number of words. If it makes a difference, I'm using Divi and making a child theme.

Does anyone know what may be the problem?

Tags : filters excerpt

Related Questions

the_excerpt filter with an empty excerpt

Updated April 23, 2017 00:08 AM

Access get_the_title() from 'excerpt_length' filter

Updated August 22, 2017 02:08 AM

Get excerpt from $post->post_content

Updated May 26, 2017 01:08 AM