WordPress.org

Support

Support » Plugins and Hacks » Hacks » Duplicate Excerpts

Duplicate Excerpts

  • I’m using the following snippet in functions.php to get a “Read More” link on excerpts:

    function new_excerpt_more($more) {
    global $post;
    return ' <a href="'. get_permalink($post->ID) . '">Read More</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    Which works but is causing duplicate excerpts like so:

    Some Post Title
    Did you read the news today?…Did you read the news today? Read More

    Does anyone see anything obviously wrong with the code or perhaps can advise a better solution?

    Thanks, Bryan

  • The topic ‘Duplicate Excerpts’ is closed to new replies.