I have a page on my WordPress site and I’d like to break up the body text after the 2nd paragraph with an <hr />(without adding it in the WordPress admin side).
Is it possible to crop my content after the 2nd </p>, add the <hr /> and then continue to export the remaining text?
So the resulting HTML could be:
<p>test1</p><p>test2</p><hr /><p>test3</p><p>test4</p>
I’m not sure where to start with this 🙁
Could someone point me in the right direction?
I thought using the_content_rss would do the trick, but there’s no real documentation on how I can achieve the above.
Many thanks for any pointers at all.
I have received an answer for a very similar question by str here: Crop string after 2nd full stop.
My eventual code looks like this: