Title: caption shortcode lost caption-attribute?
Last modified: August 20, 2016

---

# caption shortcode lost caption-attribute?

 *  [mark-up](https://wordpress.org/support/users/mark-up/)
 * (@mark-up)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/caption-shortcode-lost-caption-attribute/)
 * hi!
 * In the past (< WP 3.51) the shorttag output of the media library was:
    _[caption
   id="attachment\_12345" align="alignnone" width="100" caption="**My Caption Text**"]
   <img src=”myimage.jpg” />[/caption]_
 * Now, this changed with the WP 3.51 update to
    _[caption id="attachment\_12345"
   align="alignnone" width="100"]<img src=”myimage.jpg” /**>My Caption Text**[/caption]_
 * Because of this my img-captions are broken now:-/
 * I hooked up into the caption shortcode:
 *     ```
       add_shortcode('wp_caption', 'myImgCaption');
       add_shortcode('caption', 'myImgCaption');
       ```
   
 * extracted the caption-text for further processing with
 *     ```
       function myImgCaption(){
       	...
       	extract(shortcode_atts(array(
       		'id' => '',
       		'caption' => '',
       	), $attr));
       	...
       }
       ```
   
 * .
    This worked pretty fine, till now 🙁
 * What can I do, do force WP into the old structure?
 * Thanks
    mark

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [anntorrence](https://wordpress.org/support/users/anntorrence/)
 * (@anntorrence)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/caption-shortcode-lost-caption-attribute/#post-3573740)
 * any resolution to this?
 *  [anntorrence](https://wordpress.org/support/users/anntorrence/)
 * (@anntorrence)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/caption-shortcode-lost-caption-attribute/#post-3573741)
 * Found it, sort of, here, in case search engines bring anyone else to this thread
 * [http://wordpress.org/support/topic/caption-broken-in-new-34-posts?replies=43](http://wordpress.org/support/topic/caption-broken-in-new-34-posts?replies=43)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘caption shortcode lost caption-attribute?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [anntorrence](https://wordpress.org/support/users/anntorrence/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/caption-shortcode-lost-caption-attribute/#post-3573741)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
