Modifies WordPress excerpt via functions.php
////////////////////
// CUSTOM EXCERPT //
////////////////////
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
function custom_excerpt_more( $more ) {
return sprintf( '... <a class="bw-read-more" href="%1$s">%2$s</a>',
get_permalink( get_the_ID() ),
__( 'READ MORE »', 'textdomain' )
);
}
add_filter( 'excerpt_more', 'custom_excerpt_more' );