Changing the Excerpt length
Paste this code to the functions.php of your theme folder.
function custom_excerpt_length( $length ) { return 30; //change this number to determine the number of words returned } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
Adding “Read More” link after the excerpt
function new_excerpt_more($more) { return '... <span class="read-more"><a href="'. get_permalink($post->ID) . '">Read more »</a></span>'; //if you just want to remove the [...] after the excerpt, use 'return '';' } add_filter('excerpt_more', 'new_excerpt_more');
That’s it.