Home / Admin / Manage Admin Menus
Duplicate Snippet

Embed Snippet on Your Site

Manage Admin Menus

Sometimes, long list of admin menu items can be overwhelming. Selectively show or hide items based on needs without altering any functionalities under the hood. Add double slashes to disable or remove double slashes to enable the setting. This snippet removes all but settings menu item. For advanced functionalities, user permission management is recommended.

Code Preview
php
<?php
function hide_admin_menus() {
    remove_menu_page( 'edit.php' );           // Posts
    remove_menu_page( 'upload.php' );         // Media
    remove_menu_page( 'edit-comments.php' );  // Comments
	remove_menu_page( 'themes.php' );  		  // Appearance
    remove_menu_page( 'plugins.php' );        // Plugins
    remove_menu_page( 'users.php' );          // Users
	remove_menu_page( 'tools.php' );          // Tools
	// remove_menu_page( 'options-general.php' ); // Settings
	}
	add_action( 'admin_menu', 'hide_admin_menus', 999 );   

Comments

Add a Comment