Created
July 18, 2022 10:30
-
-
Save webgurus/3d9c6ef82290c23111a3d102629cc981 to your computer and use it in GitHub Desktop.
Change Excerpt length on Sage 9
This file contains hidden or 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
/** | |
* Filter the excerpt length to 39 words. | |
* | |
* @param int $length Excerpt length. | |
* @return int (Maybe) modified excerpt length. | |
*/ | |
add_filter( 'excerpt_length', function( $length ) { | |
return 39; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment