Support » Requests and Feedback » Feature Request: Caption for Embeds

  • Toying with captions on some drafts in my WordPress blogs, I noticed one thing: I can only add captions to images, not galleries, or embeds (including videos). The basic support for the [caption] shortcode is only for single images.

    I believe it’d be a good idea accessibility-wise (and for semantics?) to extend img_caption_shortcode() (either itself or through plugins supporting the img_caption_shortcode) to allow captions to be added to other sorts of media. For example, a caption could description the content of a gallery or slideshow in general when multiple images are meant to describe something together rather than one by one. Also, captions on embedded video can add context to the reason why that media was included in relation to the rest of the post.

    In semantics, HTML5 allows <figure> to include any sort of media; not just images. The same goes for Facebook Instant Articles and AMP, if you’re using that sort of things to publish your content.

    For this, I suppose, shortcodes within the caption shortcode would have to be supported.

    At the moment, I think I’ll have to write a custom plugin to do that job.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Well, digging into the code, I found that if I specify the width in the caption shortcode, I can add whatever I want in the content of the shortcode. The content will also be parsed by do_shortcode in that case, hence allowing me to add embeds.

    My bad. Maybe I missed that part in the docs.

    It’s good too read your website again i see some interesting updates here..

    Event Tech

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature Request: Caption for Embeds’ is closed to new replies.