Call Chris at (615) 521-1890 for a free quote.
615.521.1890
Nashville Interactive - Home

Blog

Excerpts and Read More Links in WordPress 2.9+

Jan 12 2010

With the release of WordPress 2.9, there have been a couple nice little enhancements to excerpts. It’s now very easy to change the good old […] to whatever you’d like including a simple “More” link that links to the post. It’s also now just as easy to control the length of the excerpts as well. Simply use the code below as a starting point. Place this code in your theme’s functions.php

function new_excerpt_more($more) {
return ‘… <a href=”‘.get_permalink().'”>MORE</a>’;
}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);

function new_excerpt_length($length) {
return 30;
}
add_filter(‘excerpt_length’, ‘new_excerpt_length’);