Add a read more link in wordpress

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

Add read more link for wordpress

Copy this code and paste it in your HTML
  1. function new_excerpt_more($post) {
  2. return '<a class="more" href="'. get_permalink($post->ID) . '">' . 'Read the Rest...' . '</a>';
  3. }
  4. add_filter('excerpt_more', 'new_excerpt_more');

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.