Rabbit

Tutorials

How to set the excerpt length in WordPress

The default WordPress excerpt length is 55 words. That is quite a lot of text and considering excerpts are intended to be a summary you might want to tame them. The excerpt_length filter will let you set a custom length.

add_filter( 'excerpt_length', function( $length ) {
    $length = 32;
    return $length;
}, 12 );

Posted by on .

0 comments

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>