Created
December 14, 2020 04:19
-
-
Save permanart/e3f7b6a3f4a0c79f22493b4503e5c0cc to your computer and use it in GitHub Desktop.
Remove WordPress Admin Menu
This file contains 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
/** | |
* Removes some menus by page. | |
*/ | |
function dinoiki_remove_menus(){ | |
remove_menu_page( 'index.php' ); //Remove Dashboard | |
remove_menu_page( 'jetpack' ); //Remove Jetpack | |
remove_menu_page( 'edit.php' ); //Remove Posts | |
remove_menu_page( 'upload.php' ); //Remove Media | |
remove_menu_page( 'edit.php?post_type=page' ); //Remove Pages | |
remove_menu_page( 'edit-comments.php' ); //Remove Comments | |
remove_menu_page( 'themes.php' ); //Remove Appearance | |
remove_menu_page( 'plugins.php' ); //Remove Plugins | |
remove_menu_page( 'users.php' ); //Remove Users | |
remove_menu_page( 'tools.php' ); //Remove Tools | |
remove_menu_page( 'options-general.php' ); //Remove Settings | |
} | |
add_action( 'admin_menu', 'dinoiki_remove_menus' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment