WordPress.org

Forums

Change ''Continue reading --' (13 posts)

  1. makta112
    Member
    Posted 2 years ago #

    Hello,

    I want to change the text that says "Continue reading →" into "More".

    I found the code in the parent theme and changed it. But it didn't work.

    What am I doing wrong?

    My site: http://www.geimaku.com/

    I'm using the Twenty Eleven child theme.

    Thanks.

  2. Tara
    Member
    Posted 2 years ago #

    try placing this filter in your theme's functions.php

    function new_excerpt_more($more) {
           global $post;
        return '<a href="'. get_permalink($post->ID) . '">More...</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');
  3. makta112
    Member
    Posted 2 years ago #

    Thanks but that didn't work.

  4. Tara
    Member
    Posted 2 years ago #

    Your theme (or a plugin) may be overriding your filter. Try increasing the priority like this:

    add_filter('excerpt_more', 'new_excerpt_more',11);

    Or like this:

    add_filter('excerpt_more', 'new_excerpt_more',20);

    And if that doesn't work try:

    add_filter('excerpt_more', 'new_excerpt_more',100);

  5. makta112
    Member
    Posted 2 years ago #

    Hi,

    Should I place the code on my parent theme's functions.php or the child theme's?

  6. Tara
    Member
    Posted 2 years ago #

    in the child theme's functions.php

  7. makta112
    Member
    Posted 2 years ago #

    Thanks but that didn't work. I did also try increasing the priority.

  8. Tara
    Member
    Posted 2 years ago #

    What theme are you working with?

    Hopefully someone more familiar with your theme and issue can come alog and guide you.

  9. makta112
    Member
    Posted 2 years ago #

    I'm using the Twenty Eleven child theme.

  10. Tara
    Member
    Posted 2 years ago #

    - You might try the codex about the 'read more' link.

    -plugin: http://wordpress.org/extend/plugins/advanced-excerpt/

  11. makta112
    Member
    Posted 2 years ago #

    Ok, thanks. I'll take a look.

  12. alchymyth
    Forum Moderator
    Posted 2 years ago #

    the only place where the default Twenty Eleven outputs the excerpt, is in search results.

    for all other locations, edit content.php in your child theme and find:

    <div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->

    change the text there.

    for example to:

    <div class="entry-content">
    			<?php the_content( 'More' ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->

    (you might need to do the same in content-aside.php, content-image.php, content-link.php, content-quote.php, and content-status.php)

  13. meramirpur
    Member
    Posted 2 years ago #

    Just add the line Where ever you need it. i.e in LOOP.php or in Content.php

    <a href="<?php the_permalink(); ?>" class="readmore">Read More</a>

    Thanks,

Topic Closed

This topic has been closed to new replies.

About this Topic