Skip to content

Instantly share code, notes, and snippets.

@bobbydank
Last active January 31, 2022 17:29
Show Gist options
  • Save bobbydank/9f1b3120844dae3f7e95d44baf9ccf02 to your computer and use it in GitHub Desktop.
Save bobbydank/9f1b3120844dae3f7e95d44baf9ccf02 to your computer and use it in GitHub Desktop.
Remove excess plugin menus from Wordpress
/*
Simple function you can use to remove excess menus from them Wordpress Admin menu.
Copy to functions.php in your theme.
You can find NAME by going to the menu item and looking at the link:
https://YOUR.URL.COM/wp-admin/admin.php?page=NAME <-- that part.
*/
function THEME_PREFIX_remove_excess_menus() {
remove_menu_page( 'NAME' );
}
add_action('admin_menu', 'THEME_PREFIX_remove_excess_menus', 999);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment