Replace Excerpt Ellipsis with Permalink


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function replace_excerpt($content) {
  2. return str_replace('[...]',
  3. '<div class="more-link"><a href="'. get_permalink() .'">Continue Reading</a></div>',
  4. $content
  5. );
  6. }
  7. add_filter('the_excerpt', 'replace_excerpt');

URL: http://css-tricks.com/snippets/wordpress/replace-excerpt-ellipsis-with-permalink/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.