
The “more” tag is indeed very useful in WordPress because it allow you to define a portion of post to be displayed on your blog homepage. Though, the problem with the “more” link is that you can’t change its text. Excepted if yoou apply this recipe.

The “more” tag is indeed very useful in WordPress because it allow you to define a portion of post to be displayed on your blog homepage. Though, the problem with the “more” link is that you can’t change its text. Excepted if yoou apply this recipe.
Nothing hard here. All you have to do is to define the desired text for your more link on line 3, and then paste the code snippet on your functions.php file.
<?php
$custom_more = "Continue reading this post";
add_filter( 'the_content_more_link', 'my_more_link', 10, 2 );
function my_more_link( $more_link, $more_link_text ) {
return str_replace( $more_link_text, $custom_more, $more_link );
}
?>
That's all. Using the power of hooks, you have defined a new text for the more link.
Credits goes to Justin Tadlock for this great recipe!
3 Responses
Do you know how can i edit the text “Read More” to something else like “click to read more” or “click here to read more”?
I am using WordPress!
Can anybody help?
Thanks.
Find this code in your index.php file:
and change it to this:
or
opss code skipped …
anyways just find code in your index.php file then find content and write read more as (‘read more’)
Trackbacks: