How To Customize The Read More Link for Twentyten Child Theme

By Jers in Blogging Tips, Wordpress tips

Changing the text of your wordpress blog’s read more link is really easy. There are two instances where a read more link appears, the default one, where the function the_content is used, and the posts excerpt where the_excerpt function is used.

Customizing the read more link (the_content)

To customize the read more link for your posts, just edit the corresponding parameter of the function the_content wherever it is called,  usually at loop-index.php of your child theme. Just type the text that you want to use as shown in the example below: <?php the_content( __( 'Continue reading the rest of the article <span>&rarr;</span>', 'twentyten' ) ); ?>

Customizing the read more link (the_excerpt)

Customizing the read more link for your summary pages (the_excerpt) is a little more complicated. Here’s what you need to do:

  • Open your child theme’s function.php file
  • Add the following functions
  • Edit the read more text below on the text that you want to be used.

function after_setup_theme_extend(){    remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );} function new_excerpt_more($more) { return ' [....] <a href="'. get_permalink($post->ID) . '"> Continue reading this article</a> '   ;} add_filter('excerpt_more', 'new_excerpt_more');

That’s it. Your read more text should be customized upon viewing your wordpress site.

2 Responses to How To Customize The Read More Link for Twentyten Child Theme

  1. Pingback: » Wordpress Tips: Customizing the ‘Read More’ - Link Jumps to Top of Page

  2. mae says:

    Hello! I just tagged you! I hope you can relate it with your techie side or on your easy life guide… You can place the tag in either of your blogs.

    Find it here:

    http://sinigang-dmeemai.blogspot.com/

    Hope you’ll join and share in the fun! Thanks.
    -mae

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>