Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change excerpt length of WordPress posts. Source: http://my.studiopress.com/snippets/post-excerpts/
<?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