Remove Default Post Type From Admin Menu WordPress
I recently was customizing an install of WordPress and we were using several different custom post types. We actually decided against using the default post type just for clarity’s sake. Its a simple matter to remove an item from the WordPress administrative menu. The following code should be added in your theme’s functions.php file.
Remove Default Post type
add_action('admin_menu','remove_default_post_type'); function remove_default_post_type() { remove_menu_page('edit.php'); }
The first line hooks on the action admin_menu. When the administrative menu action is called, we want to call our own function defined as remove_default_post_type. From that function, we call the built in WordPress function remove_menu_page. The only argument needed is the page’s slug. In the case of the default post type, that slug is just edit.php