Skip to content

Instantly share code, notes, and snippets.

@BrianBourn
Created June 1, 2014 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BrianBourn/f179e90957fc219c5dd6 to your computer and use it in GitHub Desktop.
Save BrianBourn/f179e90957fc219c5dd6 to your computer and use it in GitHub Desktop.
Remove extra 10px from WP image captions for pre 3.9 HTML5 caption support
<?php
//***Remove WordPress' Extra 10px Of Width On Images With Captions**/
add_filter( 'img_caption_shortcode_width', 'bourncreative_remove_caption_width' );
function bourncreative_remove_caption_width( $width ) {
return $width - 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment