• Resolved wildcatdigital

    (@wildcatdigital)


    Hi,

    I’m having a real issue with the “Read More” link in my excerpts only, going back to the original article. Anyone else every have this issue??

Viewing 1 replies (of 1 total)
  • Thread Starter wildcatdigital

    (@wildcatdigital)

    I found a solution that probably isn’t pretty but it seems to solve the issue. Instead of using the following:

    <?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?>

    I rewrote my loop as:

    <?php
    $content = get_the_content();
    $trimmed_content = wp_trim_words( $content, 45, ' <a style="text-decoration:none;font-weight:bold; color:#0b674e;" href="'. get_permalink() .'">... Read More &raquo;</a>' );
    echo $trimmed_content;
    ?>

    No more issues.

Viewing 1 replies (of 1 total)
  • The topic ‘Excerpt Link Always Goes to Original Source’ is closed to new replies.