• Resolved elmersw

    (@elmersw)


    Just wanted to share my solution to disable the metaboxes for a post type.

    /**
     * Remove OceanWP Extra metaboxes for certain post-types
     */
    add_filter( 'ocean_main_metaboxes_post_types', 'sw_metabox_settings');
    function sw_metabox_settings ( $types ) {
    
    	// Remove from posts
    	foreach ($types as $key => $type) {
    		if ($type == 'product') {
    			unset( $types[$key] );
    		}
    	}
    
    	// Return post types array
    	return $types;
    };
  • The topic ‘Disable Ocean Extra Metabox for post type’ is closed to new replies.