Are captions stored anywhere?

In regards to my previous question about shortcode captions, it doesn’t appear to me that the actual text of a caption is stored anywhere other than in the post content within the shortcode itself.

I would have thought that wp_get_attachment_metadata would store the info for an attachment, but it doesn’t.

Am I wrong? Or does WordPress not store the actual caption anywhere?

2 s
2

Yes, it stores the caption in it’s own place in the DB. I can’t quote the exact location but in WordPress, “Attachments” are a post type and it stores each attachment just like a post. For an attachment post type, it treats the Image Caption as the_excerpt the Image Description as the_content and the Image Title as… the_title.

Leave a Comment