Home / Archive / Change Read More Text for Excerpts
Duplicate Snippet

Embed Snippet on Your Site

Change Read More Text for Excerpts

Customize the "Read More" text that shows up after excerpts.
WPCode Team
200+
Code Preview
php
<?php
function wpcode_snippets_change_read_more( $read_more, $read_more_text ) {
	// Edit the line below to add your own "Read More" text.
	$custom_text = 'Read the whole post';
	$read_more = str_replace( $read_more_text, $custom_text, $read_more );
	return $read_more;
}
add_filter( 'the_content_more_link', 'wpcode_snippets_change_read_more', 15, 2 );

Comments

Add a Comment