How to Display a Read More link in WordPress Excerpts

First open your functions.php file, and paste the following code inside the php tags:

1
2
3
4
5
6
// Changing excerpt more
   function new_excerpt_more($more) {
   global $post;
   return '… <a href="'. get_permalink($post->ID) . '">' . 'Read More &raquo;' . '</a>';
   }
   add_filter('excerpt_more', 'new_excerpt_more');

In this function, you are telling WordPress to remove the default more which looks like this: […], and replace it with a link.

Leave a Reply