• I’m trying to remove the width and height attributes that WP automatically puts when using the caption shortcode and replace it with a class. You can remove the attributes manually or with a function, but then the caption is removed, leaving you with just the image.

    Basically I’d like for this:
    [caption id="attachment_1000" align="alignnone" width="544" caption="...caption text..."]<img src="path-to-image/image.jpg" alt="" title="...title text..." width="544" height="363" class="size-full wp-image-000" />[/caption]

    to look something like this:

    [caption id="attachment_1000" align="alignnone" class="full-image" caption="...caption text..."]<img src="path-to-image/image.jpg" alt="" title="...title text..." class="size-full wp-image-1000" />[/caption]

    Thanks so much!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Help removing image sizes from caption shortcode’ is closed to new replies.