Wordpress Technology

Wordpress Tips, Tutorials, Hacks

Replace [...] By Link ‘Read More’

Should you need to replace [...] by link ‘Read More’, you would only need to create next function in ‘popular’ functions.php file.

function trim_excerpt($text) {
	global $post;
	$moreLink = ' ... <a href="' . get_permalink($post->ID) . '">Read More &raquo;</a>';
	$text = str_replace('[...]', $moreLink, $text);
  return $text;
}
add_filter('get_the_excerpt', 'trim_excerpt');

If you wish you could substitute text for any another content.

Pretty simple! Enjoy!

Leave a trackback from your own site.

One Response to “Replace [...] By Link ‘Read More’”

  1. WOWZAA!! Excellent post, i think blog posts like this add so much value to the marketing community,i have learnt some valuable nuggets from you. Keep it Up! ;) me and my friend Rob B teach all my students shocking secrets on how to cash in using their blogs on auto-pilot and make few hundred dollars a day. i teach them basic hiddent tactics from blogging,Catch ya later – Julie ‘Pro Blogger’ J.

Leave a Reply

You must be logged in to post a comment.

© 2009 | Made by Vancouver Web Design | Internet Marketing