Replace Default WordPress Excerpt Ellipsis With Read More Link

Replace Default WordPress Excerpt Ellipsis With Read More Link

Add this to your functions.php file. It will replace the default […] at the end of your excerpt with a “Read More →” link.

function replace_excerpt($content) {
return str_replace('[...]',
'<a href="'. get_permalink() .'">Read More →</a>',
$content
);
}
add_filter('the_excerpt', 'replace_excerpt');

Want to Submit a Daily Tip to WPMU DEV?

If you’ve got a great tip for WordPress, WordPress Multisite, or BuddyPress users, send it our way on Twitter: @wpmudev and we’ll happily credit you. Create a tweetable title and let us know if you have more info or an article you’d like to link it to.

FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.