WordPress.org

Support

Support » How-To and Troubleshooting » Excerpts – No ‘read more’ link

Excerpts – No ‘read more’ link

  • Hi, I am using the excerpts feature. And I cannot see any (read more) link at the end of my excerpts on any page. I read that the default text was ‘…’ but I cannot even see that. I also tried the plugni ‘excerpt editor’ but still no link showing..

    thanks in advance, your help is much appreciated

Viewing 5 replies - 1 through 5 (of 5 total)
  • Are you using custom excerpts, or the built-in “the_excerpts()”? custom excerpts don’t include the ellipse.

    here is some code you may find useful to customize excerpts. If you decide to use one of these the code gets placed in your theme’s functions.php file.

    Replace Excerpt […] ellipse with user-defined text (put in functions.php)

    function excerpt_ellipse($text) {
       return str_replace('[...]', ' <a href="'.get_permalink().'">Read more...</a>', $text); }
    add_filter('the_excerpt', 'excerpt_ellipse');

    If, however, you are writing your own excerpts and want to add a Read More permalink, replace:

    <?php the_excerpt(); ?>
    with this:
    <?php the_excerpt(); ?><span class="read_more"><a href="<?php the_permalink(); ?>">[ Read More &rarr; ]</a></span>

    just what I was looking for, thanks!

    The code to be pasted into the functions.php file should have
    <?php
    before it and
    ?>
    after it like this.

    <?php function excerpt_ellipse($text) {
       return str_replace('[...]', ' <a href="'.get_permalink().'">Read more...</a>', $text); }
    add_filter('the_excerpt', 'excerpt_ellipse');
    ?>

    thanks!

    I tried using <?php the_excerpt(); ?><span class=”read_more”>“>[ Read More → ]</span> for a single post but the problem is that the link loops back to the excerpt and does not ever show the full post. Is it not possible to show summaries or excerpts of content on a single post?

    The site I’m attempting to do this with is: http://www.devonfitzgerald.com/hyperlocal

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Excerpts – No ‘read more’ link’ is closed to new replies.
Skip to toolbar