Skip to content

Instantly share code, notes, and snippets.

@guillermorangel
Last active December 26, 2015 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillermorangel/7160368 to your computer and use it in GitHub Desktop.
Save guillermorangel/7160368 to your computer and use it in GitHub Desktop.
<?php
function custom_excerpt_length( $length ) {
return 120;
} add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
function new_excerpt_more( $more ) {
return ' <a class="read-more" href="' . get_permalink( get_the_ID() ) . '">' . __( 'Read More', 'your-text-domain' ) . '</a>';
}
add_filter( 'excerpt_more', 'new_excerpt_more' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment