Snippets: Adding/Removing Page Settings Metabox From Post Types

add_filter( 'wpex_main_metaboxes_post_types', function( $types ) {
 
  // Add to my custom-type post type
  $types[] = 'custom-type';
  $types[] = 'custom-type-2';
  $types[] = 'custom-type-3';
 
  // Remove from blog posts
  unset( $types['post'] );
 
  // Return post types array
  return $types;
  
}, 20 );
All PHP snippets should be added via a child theme's functions.php file.