WordPress tutorials: Custom excerpt length

Wpsnipp – This function will be given the two filter functions. It will examine whether those features are available and if so, we applied the filter.Adding this PHP code to the functions.php file of your wordpress theme will allow you to set the length of your excerpt rather then the default 55 character limit.



function excerptLength($length) {
return 100;
add_filter('excerpt_length', 'excerptLength');

Be Sociable, Share!

Leave a comment