skip to Main Content

Disable Theme Settings Metabox Completely

// Remove from everywhere
add_filter( 'wpex_metaboxes', '__return_false' );

// Remove from specific post types
add_filter( 'wpex_metaboxes', function( $bool ) {
    if ( 'portfolio' != get_post_type( $_GET['post'] ) ) {
        $bool = false; // disable on all types besides portfolio
    return $bool;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top