Created
May 4, 2016 14:32
-
-
Save richerimage/9804d8f3212fc3ef726983b785280da2 to your computer and use it in GitHub Desktop.
conditional_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
| add_filter( 'excerpt_length', 'conditional_excerpt_length' ); | |
| function conditional_excerpt_length($length) { | |
| if ( is_front_page() ) | |
| return 80; // Change value as desired | |
| else | |
| return $length; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment