Created
June 9, 2015 14:43
-
-
Save gasatrya/389353be876a12474b4b to your computer and use it in GitHub Desktop.
Control WordPress excerpt length
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
<?php | |
/** | |
* Control excerpt length. | |
*/ | |
function prefix_excerpt_length( $length ) { | |
return 20; | |
} | |
add_filter( 'excerpt_length', 'prefix_excerpt_length', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment