Is this filter option of any help at all? Control Excerpt Length using Filters
You’re using the wrong filter.. The filter you need is excerpt_length
function update_excerpt_length()
{
return 20;
}
add_filter('excerpt_lenght', 'update_excerpt_length');
Also consider setting the priority.
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
Filter Reference: https://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_length
Both of these codes are not working for me. The one I am using works best but i am trying to figure out how to just have 100 character in there. Thanks
http://www.dpimax.com/v2/ if you scroll at the bottom you will see the news section, I am trying to make the content after the title to be just 250character with the read more, I am using the code I previously posted.
Hi,
I have a question regarding the function custom_excerpt_length.
I added the line you suggested in function.php, and it works but only for the first excerpt, not for the other article that are diplayed on my page.
How to make it loop to all article ?
I am using resolve theme.
Thanks a lot
Alice