Created
November 6, 2022 15:30
-
-
Save AndreFCAmorim/2c5cdd015d81bc31070e1af2aa24bc57 to your computer and use it in GitHub Desktop.
Change Excerpt Length on WordPress
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 | |
add_filter( | |
'excerpt_length', | |
function ( $length ) { | |
// Number of words to display in the excerpt. | |
return 40; | |
}, | |
500 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment