Created
September 25, 2013 16:00
-
-
Save michael-cannon/6701832 to your computer and use it in GitHub Desktop.
Remove custom post type submenu pages.
You need to find out the parent menu slug, used when added the submenu:
add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );
Then use this in your functions.php
replacing accordingly:
// Remove submenus
function remove_submenu() {
remove_submenu_page( '$parent_slug', '$menu_slug' );
}
add_action( 'admin_menu', 'remove_submenu', 999 );
Awesome! you're a life saver) thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I remove a sub-menu with link
http://vagrant.local/wp/wp-admin/admin.php?page=home_settings_page
?I tried
remove_submenu_page( 'admin.php', 'yrc_home_settings_page' );
but that didn't work.