I am currently using a wordpress plugin called “limit-posts” to better customize my post excerpts. The only issue I have is the excerpt is including the caption text from the image that is within the post.

I can see in the code that all captions are enclosed in tags

Is there a way I can strip out the any content within em tags from the post excerpt?

Here is a link to the current plugin in use – http://labitacora.net/comunBlog/limit-post.phps

Thank you very much

3 Answers
3

From what I understand the caption is a shortcode, so wrap get_the_content(…) inside strip_shortcodes() and it should remove it…

Leave a Reply

Your email address will not be published. Required fields are marked *