Last active
January 28, 2020 08:08
-
-
Save CreativeDive/9c58bbb36a84b0df695697b765d5b152 to your computer and use it in GitHub Desktop.
Customize the length of the WordPress post excerpt in words.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( ! function_exists('wordpress_excerpt_length') ) : | |
function wordpress_excerpt_length( $length ) { | |
return 55; // <-- Word count | |
} | |
endif; | |
add_filter( 'excerpt_length', 'wordpress_excerpt_length', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Further explanation about how you can customize the WordPress post excerpt (DE Version)