• Hi!

    I have tried to get rid of the […] which is placed after every excerpt. I managed to modify the one that is placed after the automatically generated ones, but it still was there on the one with manual excerpt.

    How can I fix this?

    I also wonder how a “read more”-link could be added just when the post is longer than the excerpt.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Well, the the_excerpt and the “more” link are two different things.

    Thread Starter gate303

    (@gate303)

    Yes, I am aware of that… =)
    But that wasn’t my question.

    You may want to try this plugin:
    https://guff.szub.net/the-excerpt-reloaded

    In case anyone is searching for how to get rid of this in the RSS results, find functions-formatting.php and change line # 732. That’s where I did it…seems to work OK. Please let me know if I have screwed something else up. LOL

    I just took out the [ and the ] but I imagine you could put anything there you wish.

    You can see it in action at https://www.thestopsmokingguide.com in the right hand navigation column.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    A somewhat better approach (which doesn’t involve modifying core files)… Put this in your theme’s functions.php or in a plugin.

    function modify_excerpt($excerpt)
    {
    return str_replace('[...]','whatever',$excerpt);
    }
    add_filter('get_the_excerpt','modify_excerpt');

    If you only want it to apply to the feeds and not elsewhere, change the get_the_excerpt above to the_excerpt_rss.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Get rid of […]’ is closed to new replies.