skip to Main Content

Snippet: Disable the Gallery Metabox

Important: This can now be done via the Theme Panel.

The following snippet can be used to disable the Gallery metabox completely so it doesn't display in any post type.

 * Disable the Gallery Metabox.
 * @link
add_filter( 'wpex_gallery_metabox_post_types', '__return_empty_array' );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend WPCode)
Back To Top