I created a custom post type.
When I click "Add new" for this post type, I see among other meta boxes a "Main Slider Item SEO" meta box. This SEO is superfluous. Can I remove it?
add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'main_slider_item', array( 'labels' => array( 'name' => __( 'Main Slider Items' ), 'singular_name' => __( 'Main Slider Item' ), 'menu_name' => __( 'Main Slider' ) ), 'description' => "A banner with a text and button", 'public' => true, 'exclude_from_search' => true, 'show_in_nav_menus' => false, 'map_meta_cap' => false, 'supports' => array('title', 'thumbnail'), 'has_archive' => false, 'show_in_nav_menus' => false, ) ); }
I also want to remove editing layout for this custom post type.
In fact for this post type I am going to display only the excerpt on the mainpage and am not going ever to display the page of the post.
/library/admin/meta-box-post-seo.php
. From the looks of it, it adds this meta box to all public post types. You can probably restrict it with a `if($post-type != 'my-custom-post-type') statement, if you don't mind hacking your theme. It might be easier to just ignore it or hide it with CSS, though.