how do I change the default excerpt length in wordpress

While there are plugins that can help us manage the length ofour excerpts, it is nice to know how to change the length natively.

In WordPress, excerpt default length is set to 55 words.

It is quite easy to change, all you need to do is  modify the default length for the excerpts, we can do this by using excerpt_length filters.

We need to open our functions.php file in our theme  and add the following snippet :

function custom_excerpt_length( $length ) { return 110; } add_filter( ‘excerpt_length’, ‘custom_excerpt_length

That’s it, pretty easy huh?

Written by

Tom Strubinger was raised in the Mid-West and has lived in South Florida since 1995. He got his first exposure to computer maintenance and programming in 1988, and has been the friend and neighbor everyone relied for computer help, ever since. In 2001 after 911 tragedy, he went back to school and started doing IT Support professionally. In 2004 SoFla Networking was incorporated as a LLC and has been thriving ever since. SoFla Networking now offers Complete IT Solutions including Web Design, SEO, and Social Media Marketing.

No Comments Yet.

Leave a Reply