Created
March 17, 2020 12:27
-
-
Save someguy9/e490bd1f75f95477e790ed3f7e4be50b to your computer and use it in GitHub Desktop.
Change the default excerpt length in WordPress (default is 55 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
<?php | |
//Change the default excerpt length in WordPress (default is 55 words) | |
function smartwp_change_excerpt_length( $length ) { | |
return 24; | |
} | |
add_filter( 'excerpt_length', 'smartwp_change_excerpt_length', 9999); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment