Excerpt method doesn't strip caption from image kirbytag

Sonja:

The idea of searching for the first p tag sounds good. I searched in the Forum and found this:

https://forum.getkirby.com/t/variable-length-excerpts-possible/1073/4

In this thread, you have suggested some code for a getFirstPara() function. I tried to get this to work yesterday, creating a new php file in Controllers, but something went wrong. I’ll try again next week. I need to learn a bit more php too!

There’s another suggestion from you in the same thread, and this extracts everything from the first <p> tag until a comment tag <!-- more -->. This might be my best solution.

Thanks again for your suggestions!