Reply To: Word Limit for Post Excerpt in Home Page

#8550
Joseph Nirmal
Guest

Hi Ron

I want to limit post excerpt without using additional plugin.

Can I try a simple code like this? One of our theme used site limit the post excerpt to 100 words SEE – http://upcomingrailwayrecruitment.in/

add these lines in function.php file

function custom_excerpt_length( $length ) {
        return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 )