• Resolved Postmatic

    (@vernal)


    Media Credit seems to work great so long as the image does not have a caption. If a caption is in place, though, it seems like the media-credit shortcode doesn’t fire. I get this:

    <div id="attachment_980" class="wp-caption aligncenter" style="width: 600px">[media-credit name="Jason Lemieux" align="aligncenter" width="600"]<img class="size-large wp-image-980 colorbox-580" title="2651265613_c8595434e8_b" src="http://blahblah.com/wp-content/uploads/2011/04/2651265613_c8595434e8_b-600x400.jpg" alt="" width="600" height="400" />[/media-credit]<p class="wp-caption-text">A turtle eating a strawberrry</p></div>

    Any idea on that?

    Thanks!
    Jason

Viewing 1 replies (of 1 total)
  • I have this problem as well. What happens is that the [media-credit] [/media-credit] falls inside the caption code, so when the caption comes up, the first thing in the caption text is the [/media-credit] bracket.

    The workaround is simple but annoying: go back to the code and move the [media-credit] and [/media-credit] brackets so that they are first and last in the nested code, like so:

    Instead of this:

    <div id="attachment_980" class="wp-caption aligncenter" style="width: 600px">[media-credit name="Jason Lemieux" align="aligncenter" width="600"]<img class="size-large wp-image-980 colorbox-580" title="2651265613_c8595434e8_b" src="http://blahblah.com/wp-content/uploads/2011/04/2651265613_c8595434e8_b-600x400.jpg" alt="" width="600" height="400" />[/media-credit]<p class="wp-caption-text">A turtle eating a strawberrry</p></div>

    …you want this:

    [media-credit name="Jason Lemieux" align="aligncenter" width="600"]<div id="attachment_980" class="wp-caption aligncenter" style="width: 600px"><img class="size-large wp-image-980 colorbox-580" title="2651265613_c8595434e8_b" src="http://blahblah.com/wp-content/uploads/2011/04/2651265613_c8595434e8_b-600x400.jpg" alt="" width="600" height="400" /><p class="wp-caption-text">A turtle eating a strawberrry</p></div>[/media-credit]

    It would be great if Media-Credit did this by itself but I’m sure very few people notice it.

    –Omar

Viewing 1 replies (of 1 total)
  • The topic ‘Misfiring when caption is included?’ is closed to new replies.