Vajna Botond

Online Portofolio

How to add read more link to your WordPress excerpt?

By default WordPress function the_excerpt(); does not display a read more link.
To display link to post after the excerpt you must filter the excerpt_more.

function vkb_excerpt_more($more) {
global $post;
   return '… <a href="'. get_permalink($post->ID) . '">' . 'Read More &raquo' . '</a>';
add_filter('excerpt_more', 'vkb_excerpt_more');

You can replace the Read More &raquo text with anything you like.