Created
January 15, 2015 19:25
-
-
Save gabydevdev/e9e458f2c10da1c5b3bb to your computer and use it in GitHub Desktop.
WP Custom Excerpt
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
| <?php | |
| // You can add this in your function.php file to modify the Wordpress Excerpt | |
| if ( !function_exists( 'theme_excerpt_length' ) ) : | |
| function theme_excerpt_length( $length ) { | |
| return 40; | |
| } | |
| endif; | |
| if ( !function_exists( 'theme_excerpt_more' ) ) : | |
| function theme_excerpt_more( $more ) { | |
| return '...'; | |
| } | |
| endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment