Skip to content
Development

How to change the Read More link in WordPress

Change the Read More text and link for excerpts and the More tag with filters, or in block themes with no code, without editing theme files live.

By WP24×7 engineers5 min readPublished September 29, 2009Updated November 29, 2026

At a glance

A how-to for changing the Read More text and link in WordPress. It explains the two sources of Read More, automatic excerpts and the More tag, and gives filter code for each, for manual excerpts and for excerpt length. Block themes can do the same in the Site Editor with no code. It also covers accessibility and common mistakes.

Updated November 29, 2026 · For WordPress site owners and theme developers

  • For site owners and theme developers
  • Automatic excerpts the excerpt_more filter
  • More tag the the_content_more_link filter
  • Block themes Post Excerpt and Read More blocks, no code
  • Where to put code a child theme or small plugin, after a backup
  • Default excerpt length 55 words

"Read more" appears in two different ways in WordPress, and they are changed by two different hooks. Use `excerpt_more` for automatic excerpts and `the_content_more_link` for the More tag, or the Site Editor blocks if your theme supports them.

Where does Read More come from?

SourceWhat WordPress doesHook that changes it
Excerptthe_excerpt() trims the post to a set number of words and adds […]excerpt_more
More tagThe More block (or <!--more-->) shows content up to that point, then a linkthe_content_more_link
Manual excerptShown exactly as written, no ending addedget_the_excerpt or the template

A theme can also draw its own button after either, so check what yours does before changing anything.

In a child theme or small plugin, after a backup:

add_filter( 'excerpt_more', function () {
	return sprintf(
		' &hellip; <a class="read-more" href="%s">%s</a>',
		esc_url( get_permalink() ),
		esc_html__( 'Continue reading', 'my-site' )
	);
} );

This replaces […] with an ellipsis and a link. If you only want to remove the text, return an empty string or just &hellip;. A manually written excerpt is shown exactly as written, so add your link in the template. The word count of automatic excerpts is controlled by the excerpt_length filter, and some themes use their own excerpt function and ignore this filter.

What did the old advice get wrong?

Older tips told you to edit index.php in the dashboard's theme editor and change the call to the_content(). Three problems:

  • A theme update overwrites the edit.
  • A typo in the dashboard editor can take the site down with no undo. You can switch the editor off with DISALLOW_FILE_EDIT, covered in our file manager plugin warning.
  • The the_content() function takes a link text argument, but passing other values as in old guides gives unexpected results.

Filters are the right tool, because they work in every theme and survive updates.

Since manual excerpts skip excerpt_more, append the link yourself when the editor wrote an excerpt:

add_filter( 'get_the_excerpt', function ( $excerpt, $post ) {
	if ( is_admin() || ! has_excerpt( $post ) ) {
		return $excerpt;
	}
	return $excerpt . sprintf(
		' <a class="read-more" href="%s">%s</a>',
		esc_url( get_permalink( $post ) ),
		esc_html__( 'Continue reading', 'my-site' )
	);
}, 10, 2 );

Automatic excerpts are left to excerpt_more, so you do not get two links. If your theme prints its own button after the excerpt, use only one of the approaches.

How do I change the excerpt length?

add_filter( 'excerpt_length', function () {
	return 30; // words
}, 999 );

A high priority number makes it run after a theme's own setting. Block themes control length in the Post Excerpt block instead.

Which approach should I choose?

SituationBest choice
Classic theme, automatic excerptsexcerpt_more filter
Editors use the More tagthe_content_more_link filter
Editors write excerpts by handget_the_excerpt filter or edit the template
Block themeSite Editor blocks, no code
Theme draws its own buttonChange the theme template in a child theme
  • Include the post title in the link, visibly or with a screen-reader-only span.
  • Use a real link, not a button with JavaScript, so it works for everyone and search engines can follow it.
  • If you track clicks in analytics, give the link a class and trigger the event on that class.
  • Keep the text short and honest: "Continue reading" or "Read the guide" is better than "Click here".

How do I check it?

  1. Create a test post

    Make it longer than the excerpt length, without a manual excerpt.

  2. Open your blog page

    Check the ending and its link.

  3. Test the More tag

    Add a More block in another post and check that list page.

  4. Test a manual excerpt

    See what your theme does there.

  5. Check other lists

    Search results and category pages often use the excerpt as well.

A common scenario

Suppose a magazine site shows cards with an image, title and excerpt, and the designer wants a "Read the story" link after each. The cards use automatic excerpts for most posts, but editors write a hand excerpt for features. If you only use excerpt_more, the features have no link and look inconsistent. The cleaner fix is to put the link in the card template once, outside the excerpt, so it appears on every card whichever way the excerpt was made, and to leave both filters alone.

Common mistakes

Need a custom blog layout?

A developer reads your brief, today.

FAQ

Questions people ask

12 answers. Can't find yours? Ask an engineer.

Why does my excerpt not show the Read More text?

A manually written excerpt does not get the excerpt_more text added. The filter only applies to automatically trimmed excerpts.

Link to this answer
What is the difference between excerpt_more and the_content_more_link?

excerpt_more changes the text after an automatic excerpt. the_content_more_link changes the link created by the More tag in the editor.

Link to this answer
Can I do this without code?

In a block theme, yes. The Read More block and the Post Excerpt block both have text settings in the Site Editor.

Link to this answer
Can I change how long automatic excerpts are?

Yes, with the excerpt_length filter, which returns a number of words. The default is 55 words.

Link to this answer
Why is editing index.php in the theme editor a bad idea?

A theme update overwrites the edit, and a typo in the dashboard editor can take the site down with no undo. Filters in a child theme or plugin work in every theme and survive updates.

Link to this answer
Why does my filter change nothing?

Some themes use their own excerpt function or draw their own button, so the filter never runs. Check the theme template, and clear any page cache after changing the code.

Link to this answer
Where should the filter code live?

In a child theme or a small plugin, never the parent theme where an update removes it. Take a backup before changing a live site.

Link to this answer
Do search and category pages use the same excerpt?

Often yes. Test search results and category pages as well as the blog page after the change, since many themes reuse the excerpt template there.

Link to this answer
Can WP24x7 build custom card layouts with a Read More link?

Yes. Card layouts with custom Read More behavior are theme work. Post a project and a developer will tell you what is involved.

Link to this answer

Keep reading

Want an engineer on it?

Tell us what is wrong in plain words. A person reads it, today.