The Read More link on the Blog or Content Archive pages can easily be changed to anything you like.
Suppose you’d like the link to say “Continue Reading…” Simply put this code in your functions.php file:
// Edit the read more link text add_filter('get_the_content_more_link', 'custom_read_more_link'); add_filter('the_content_more_link', 'custom_read_more_link'); function custom_read_more_link() { return ' <a class="more-link" href="' . get_permalink() . '" rel="nofollow">Continue Reading …</a>'; }
The code above should be placed in your child theme functions.php file anywhere after:
require_once(TEMPLATEPATH.'/lib/init.php');
and before the following closing code (if it exists):
?>
If you’d like to apply this custom read more to the excerpt as well, add this line at the beginning of the code above:
add_filter( 'excerpt_more', 'custom_read_more_link');
Which gives you a complete block of code that looks like this:
// Edit the read more link text add_filter( 'excerpt_more', 'custom_read_more_link'); add_filter('get_the_content_more_link', 'custom_read_more_link'); add_filter('the_content_more_link', 'custom_read_more_link'); function custom_read_more_link() { return ' <a class="more-link" href="' . get_permalink() . '" rel="nofollow">Continue Reading …</a>'; }
thank you!
Thanks!
The only thing i did in functions.php of the Neo-theme (child theme of Genersis) was replacing the word “Read More” in “Lees verder”. That did the trick! See code below.
/** Custom “Rread More” link */
add_filter( ‘excerpt_more’, ‘zp_read_more_link’ );
add_filter( ‘get_the_content_more_link’, ‘zp_read_more_link’ );
function zp_read_more_link( ) {
return ‘… ‘.__( ‘Lees verder ‘,’neo’ ).’»‘;
Alex,
You did not add a class to your link, nor a no follow. The class is important if you want to ever style that link. The no follow is important too, but I’ll leave that for you to Google as lots has already been written on the subject.
Thank you, appreciate you taking the time to post this.
Sometimes the issue is only because the theme is trying to redefine the language variable “Read more…” (that already exists in WordPress) as “[Read more…]” (including the brackets) and do not include translations to other languages, which makes it confusing.
If you see that, you can get yourself *inside* the theme files, find the __(‘[Read more…]’, ‘theme_name’)
and change it for
‘[‘.__(‘Read more…’).’]’
This way, you only translate “Read more…” from the default WordPress config and add the brackets around it. This should be a “best practice” item for themes developers, otherwise they’re just making non-English site builders loose their time on details.
I’m getting the following error Parse error : syntax error, unexpected ” <a
class="more-link"
hr' (T_CONSTANT_ENCAPSED_STRING) in /home/
menoavgd/public_html/#####.com/wp-content/
themes/Genesis/functions.php on line 103
You have a syntax error on line 103 of your functions file.
Thanks!
How i customize that read more button in css ?
The read more link has a class on it that you can use to do this.
Just wanted to say thanks… integration worked perfectly for the site I was working on…
Thanks Laura..
I just added the Continue Reading tag to my blog built with Genesis… It worked perfectly. What about styling it?
Thanks, laura, its work like a charm