Skip to content

Instantly share code, notes, and snippets.

@robspangler
Created July 25, 2016 19:39
Show Gist options
  • Save robspangler/81d7a0fbd474a1490d57c1de4112667b to your computer and use it in GitHub Desktop.
Save robspangler/81d7a0fbd474a1490d57c1de4112667b to your computer and use it in GitHub Desktop.
Common WordPress Functions
//Update length
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
//Update more indicator
function custom_excerpt_more( $more ) {
return '...';
}
add_filter( 'excerpt_more', 'custom_excerpt_more' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment