duskosobic
1/25/2017 - 10:54 PM

Replace Excerpt Ellipsis with Permalink. This is useful if you would like to replace the ellipsis [...] from the excerpt with a permalink to

Replace Excerpt Ellipsis with Permalink. This is useful if you would like to replace the ellipsis [...] from the excerpt with a permalink to the post.

<?php
function replace_excerpt($content) {
       return str_replace('[...]',
               '<div class="more-link"><a href="'. get_permalink() .'">Continue Reading</a></div>',
               $content
       );
}
add_filter('the_excerpt', 'replace_excerpt');
?>