-
-
Save jpmarchand/5910ad2199792075e876 to your computer and use it in GitHub Desktop.
Change excerpt length of WordPress posts. Source: http://my.studiopress.com/snippets/post-excerpts/
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
<?php | |
//* Change excerpt length of WordPress posts | |
function customprefix_excerpt_length($length) { | |
return 50; // pull first 50 words | |
} | |
add_filter('excerpt_length', 'customprefix_excerpt_length'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment