WordPress.org

Ready to get started?Download WordPress

Forums

Adding attributes to the caption shortcode (1 post)

  1. rmvgaines
    Member
    Posted 4 years ago #

    I have searched the forum looking for a way to add an attribute to the caption shortcode and I have found some information on the subject, however I have not found anything conclusive that seems to work.

    How would someone add an attribute to an image caption's shortcode?

    Example:
    [caption id="attachment_1111" align="alignnone" width="100" caption="ABC" foo="bar"]<a href="http://www.somewhere/image.jpg"><img class="size-full wp-image-1111" title="an image" src="http://www.somewhere/image.jpg" alt="a picture" width="100" height="100" /></a>[/caption]

Topic Closed

This topic has been closed to new replies.

About this Topic