Created
July 14, 2015 07:40
-
-
Save jainnidhi/2ae483c940b82c5bbd6e to your computer and use it in GitHub Desktop.
change 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
//* Modify the length of post excerpts | |
add_filter( 'excerpt_length', 'cambodia_excerpt_length' ); | |
function cambodia_excerpt_length( $length ) { | |
if(is_archive()) { | |
return 50; // pull first 50 words | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment