Are you displaying excerpts on your WordPress blog without any excerpt related plugins?  Do you want to control the length of the excerpts?  This method is great if you do not want to use plugins to control the length of your excerpts.

Use the code below that you can insert into the file plugins.php on the root of your theme folder to increase or decrease the excerpt length.

// Changing excerpt length

function new_excerpt_length($length) {
return 100;
}
add_filter(‘excerpt_length’, ‘new_excerpt_length’);

// Changing excerpt more
function new_excerpt_more($more) {
return ‘…’;
}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);

NB: Add the above code before the closing ?> tag in functions.php.

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Pin It on Pinterest

Shares
Share This