Add “Read More” permalink to the end of the_excerpt

Adding this snippet to the functions.php of your wordpress theme will add a “read more” permalink at the end of the excerpt much like the_content does.

 

 

function excerpt_readmore($more) {
return '... <a href="'. get_permalink($post->ID) . '" class="readmore">' . 'Read More' . '</a>';
}
add_filter('excerpt_more', 'excerpt_readmore');

Leave a comment