gate303
Member
Posted 7 years ago #
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.
Well, the the_excerpt and the "more" link are two different things.
gate303
Member
Posted 7 years ago #
Yes, I am aware of that... =)
But that wasn't my question.
neurodude
Member
Posted 6 years ago #
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 http://www.thestopsmokingguide.com in the right hand navigation column.
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.