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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator t-p

    (@t-p)

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

    (@makta112)

    Thanks but that didn’t work.

    Moderator t-p

    (@t-p)

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

    makta112

    (@makta112)

    Hi,

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

    Moderator t-p

    (@t-p)

    in the child theme’s functions.php

    makta112

    (@makta112)

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

    Moderator t-p

    (@t-p)

    What theme are you working with?

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

    makta112

    (@makta112)

    I’m using the Twenty Eleven child theme.

    Moderator t-p

    (@t-p)

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

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

    makta112

    (@makta112)

    Ok, thanks. I’ll take a look.

    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.