How to Add a Read More Link to Manual Excerpts

Written by Jean Galea
Written by Jean Galea

Last updated on 23 Mar 2014

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.

WP Mayor is supported by its audience. If you purchase through a link on our site, we may earn a commission. Here’s why you can trust us.

Table Of Contents

Table of Contents

Before We Get Started

We found a fully managed WordPress host with fantastic speed, security, and support that has performed consistently for many of our sites.

WP Engine’s longevity and reputation speak for themselves. They offer a hosting platform that allows you to build, test, and deploy faster, along with built-in performance optimizations, backups, and much more.

Try it today and save $100+ in your first year.

With that said, let’s get started…

Introduction

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.

<span style="font-weight: 400">Written by: </span>Jean Galea
Written by: 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.

BionicWP

Quick Links

Did you find this article helpful?

Share Your Discovery

6 Responses

  1. 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.

  2. 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?

Leave a Reply

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

Discover more tips and tools.
Join 5000+ designers, developers, and site builders who follow us to receive the best guides, tools, and services for their website builds every week.

Hey, design enthusiasts...

Elevate your website designs with our free transformative guide on the 60-30-10 rule.

Discover how this simple, yet powerful, principle can make your designs infinitely better!

By downloading this guide, you are opting in to our email list. We don’t send spam. You may unsubscribe any time.

What's missing?