Sometimes adding captions to your images in WordPress can throw out your theme. If you’d like to be able to stop users from adding captions then it’s very simple to do. Just add the code below to your functions.php file.

This won’t stop existing captions from displaying. It will simply stop the caption field from showing in the editor so that captions can’t be added to any new images that are uploaded.

// Hides caption field in image editor
add_filter( 'disable_captions', create_function('$a', 'return true;') );

Leave a Comment