‘Read-more’ on all Excerpts in WordPress

Occasionally, the excerpt does not show a read-more at the end of the text. This is obviously the case, if the text content of the post is shorter than the set excerpt length.

Normally this is no problem – however, if your post contains images and/or important formatting, you would like to point the reader to the full post.

The above also assumes that you have customized your theme, to show a link to the post at the end of the excerpt – refer to the Codex chapter ‘Make the read-more link to the post‘.

A way to remedy the situation, is to edit functions.php of the theme, and to find the related code, such as:

function new_excerpt_more($more) {        global $post; 	return '<a href="'. get_permalink($post->ID) . '">' . 'Read the Rest...' . '</a>'; } add_filter('excerpt_more', 'new_excerpt_more');

Remove that, and add a new filter function in its place; something like:

function excerpt_read_more_link($output) {
 global $post;
 return $output . '<a href="'. get_permalink($post->ID) . '">Read All ...</a>';
}
add_filter('the_excerpt', 'excerpt_read_more_link');

And now you have a ‘read-more’ link at the end of each excerpt, linked to the full post.