Duplicate Excerpts (1 post)

  1. Bryan Hadaway
    Posted 3 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.