I want to show the post content until the more tag, or if there's no more tag than just first n words. Something really basic, right? Obviously I need to use get_the_excerpt
function. But the problem is that this function is behaving strangely. It adds a suffix to the end, that nobody wants. And you can't remove it!
You could in the pas do this
But this no longer works, because Wordpress decided to give us even more bad time with this by changing [...]
to something like […]
Now you can't even str_replace
or rtrim
that […]
. Trust me I tried.
The solution from here works, but this only cuts text after n words. It ignores the more tag.
Another way would be to use get_the_content
, but that just shows the full post content even if I select Summary in the Settings -> Reading.
So please, what am I missing here?