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


function remove_default_post_type() {

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

Posted by Will on March 7, 2013

Leave a Reply

Your email address will not be published. Required fields are marked *

TechJunkie Also Recommends