Append more link to ALL excerpts


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

Appends a custom more-link to all excerpts, regardless of whether they're auto-generated or pulling manual excerpts from the excerpt field. Note: Automatic excerpts still show the default […] at the end (before the more-link).

Found here: http://themeshaper.com/forums/topic/read-more-link-in-manual-excerpt#post-12992


Copy this code and paste it in your HTML
  1. function all_excerpts_get_more_link($post_excerpt) {
  2.  
  3. return $post_excerpt . '&nbsp;<a href="'. get_permalink($post->ID) . '">' . 'Read More...' . '</a>';
  4. }
  5. add_filter('wp_trim_excerpt', 'all_excerpts_get_more_link');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.