Created
July 4, 2021 09:16
-
-
Save sachithrrra/4edf1c3cd42cf113f5a6fd00cee32fe2 to your computer and use it in GitHub Desktop.
Change Wordpress excerpt length
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
function custom_excerpt_length( $length ) { | |
return 45; // Use any integer per your requirement. | |
} | |
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment