Add text/link next to the last word of each post

If your site or post type doesn’t use Gutenberg, this is likely because of the wpautop function: it is applied with priority 10 on the_content filter, so the paragraph tags have already been added by the time your filter is running. Changing your callback’s priority to be less than 10 will likely solve your issue.

If your site/CPT does use Gutenberg, then an HTML parser will be necessary to add in your link. See the answer here:
https://stackoverflow.com/questions/2100692/get-last-li-element-from-a-string

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş