Last active
November 30, 2017 13:57
-
-
Save jimmy89Li/ec2267f2f2a37a71c4ee697831b19bde to your computer and use it in GitHub Desktop.
Remove custom submenu pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 ); | |
// Replace those next | |
function remove_submenu() { | |
remove_submenu_page( '$parent_slug', '$menu_slug' ); | |
} | |
add_action( 'admin_menu', 'remove_submenu', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment