Function to create a better excerpt - read more


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



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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.