TechJunkie is a BOX20 Media Company

Home Web Remove Default Post Type From Admin Menu WordPress

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

The Complete Guide to Customizing the Mac OS X Dock

Read Next 

Leave a Reply

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


Will

Mar 7, 2013

57 Articles Published

More