Excerpt length – how to change

It can be very annoying when you are creating a theme, when the excerpt function [with a default word count of 55], controls how you structure a layout.

Luckily, there are ways of getting around this. Probably the most easy of all, simply add the following code to your functions.php file and change the amount of words to suit your design.

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

Leave a Reply