How to Add a Read More Link to Manual Excerpts

If you want to add a 'read more' link to your manual excerpts, here's how to do it. I tested this code with a child theme from Genesis but it should work for all themes.

If you want to add a ‘read more’ link to your manual excerpts, here’s how to do it.

//* Changing excerpt more - only works where excerpt IS hand-crafted
function manual_excerpt_more( $excerpt ) {
	$excerpt_more = '';
	if( has_excerpt() ) {
    	$excerpt_more = '&nbsp;<a href="' . get_permalink() . '" rel="nofollow">[Read more]</a>';
	}
	return $excerpt . $excerpt_more;
}
add_filter( 'get_the_excerpt', 'manual_excerpt_more' );

I tested this code with a child theme from Genesis but it should work for all themes.

If you enjoyed this post, make sure to subscribe to WP Mayor’s RSS feed.

Jean Galea
Jean Galea
Jean Galea is an investor, entrepreneur, and blogger. He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.

Consider sharing this post so others can find it:

Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on telegram
Share on whatsapp
Share on pocket
Share on email

Join thousands of people receiving real-world, genuine evaluations of WordPress products and services just like this one every week.

Our Sponsors
Prevent Direct Access
Contents

5 Responses

  1. The manually created excerpts don’t have anything like “read more” in the RSS feed. The posts have the link on the main page. When I look in the RSS feed, I can see that the automatically generated excerpts have […] at the end. Do you know how to add something to those manually created excerpts in the RSS feed?

  2. Hi! Thank you very much!
    May be you know how to make that my custom more link showing in same paragraph. Now it looks like that:

    (paragraph tag open)
    here manual excerpt text
    (paragraph tag close)
    (paragraph tag open)
    here my custom more link
    (paragraph tag close)

    I want to display more link inline at the end of excerpt text, after last letter.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Beginner’s Handbook
From an introduction on how WordPress works to our recommendations on products and services.
👋 Hey there! We're Gaby and Mark
Every week we share tutorials and genuine reviews of WordPress products and services in our newsletter.
Thousands of people read it!
We’d love for you to join.
We’d love for you to join. Here’s what you’ll be getting:

A single weekly email directly to your inbox.