WordPress.org

Support

Support » Themes and Templates » Change ''Continue reading –'

Change ''Continue reading –'

Viewing 12 replies - 1 through 12 (of 12 total)
  • Tara

    @t-p

    Volunteer Moderator

    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');

    Thanks but that didn’t work.

    Tara

    @t-p

    Volunteer Moderator

    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);

    Hi,

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

    Tara

    @t-p

    Volunteer Moderator

    in the child theme’s functions.php

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

    Tara

    @t-p

    Volunteer Moderator

    What theme are you working with?

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

    I’m using the Twenty Eleven child theme.

    Tara

    @t-p

    Volunteer Moderator

    – You might try the codex about the ‘read more’ link.

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

    Ok, thanks. I’ll take a look.

    Moderator Michael

    @alchymyth

    Forum Moderator

    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)

    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,

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Change ''Continue reading –'’ is closed to new replies.