Skip to content

Instantly share code, notes, and snippets.

@satrya

satrya/excerpt.php

Created Jun 9, 2015
Embed
What would you like to do?
Control WordPress excerpt length
<?php
/**
* Control excerpt length.
*/
function prefix_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'prefix_excerpt_length', 999 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment