Wordpress excerpt more text


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



Copy this code and paste it in your HTML
  1. // excerpt read more links and wrap excerpt in p tag
  2. function all_excerpts_get_more_link($post_excerpt) {
  3. return '<p>' . $post_excerpt . '</p>' . '<p class="readmore"><a href="'. get_permalink($post->ID) . '">' . 'Continue Reading &raquo' . '</a></p>';
  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.