WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Increase the number of words displayed on homepage post preview

[Resolved] Increase the number of words displayed on homepage post preview

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    By default, excerpt length is set to 55 words. To change excerpt length using “excerpt_length” filter, add the following code to your theme’s functions.php file :

    function custom_excerpt_length( $length ) {
    	return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 100 );

    In this example, the value “100” will display excerpts limited by 100 words.

    Hey @joshgarrod. You may want to create a child theme and place the code provided by @riversatile in the functions.php file for that child theme. If you add it to the current functions.php file, you will lose that info if a theme update comes out and you update it.

    Here is some info on how to do this:
    http://codex.wordpress.org/Child_Themes

    Amazing, thanks very much for your help guys! Topic solved!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Increase the number of words displayed on homepage post preview’ is closed to new replies.