• I’ve got the latest version of wordpress installed.

    I’m writing text into the excerpt box in the ‘add new post’ box of the admin system and then calling this via the_excerpt() function.

    I’ve tried several ways of changing the default excerpt length from 55 to 10 words, including changing the excerpt_length in the formatting.php file, as well as adding the well known functions within my own theme’s functions template that I found in the codex.

    Can anyone give me any pointers or codes where they have been successful in trimming the excerpt length?

    Much appreciated!

Viewing 1 replies (of 1 total)
  • Try adding something like:

    <?php add_filter('excerpt_length', 'my_excerpt_length');
    function my_excerpt_length($length) {
    	return 40; // Or whatever you want the length to be.
    }?>

    to your theme’s functions.php file.

Viewing 1 replies (of 1 total)
  • The topic ‘excerpt length – even with functions/plugins, not changing’ is closed to new replies.