I’m using a snippet of code to effectively remove the 10px of added width WordPress adds to caption images on the front end of the site. However, it’s still adding 10px in the tinymce editor:
<dl id="attachment_69" class="wp-caption alignleft" style="width: 310px" data-mce-style="width: 310px;">
How can I remove this 10px? I’ve tried modifying the core (bad idea, I know) by changing “10 +” to 0 in a few places, but I’m not having any luck.
Thanks!
Here’s what we’re using. Put this in the functions.php for your theme.
This eliminates the 10px problem altogether and removes the need for workarounds.