Posted By

hussong on 10/06/10


Tagged

page wordpress functions excerpt more


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

bobbym245


Append more link to ALL excerpts


 / Published in: PHP
 

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

  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  

You need to login to post a comment.