Table of Contents
When it comes to WordPress website management, the admin area can quickly become crowded with unnecessary menu items. These items can not only make navigating the admin area difficult, but they can also cause confusion and security risks.
This blog post will show you how to remove unnecessary menu items from the WordPress admin area in two simple steps.
Method #1: Removing Unnecessary WordPress Menu Items by Plugin
Several plugins are available to help you easily remove unwanted menu items from the WordPress admin area.
The following are two of the most popular and user-friendly plugins:
Admin Menu Editor is a powerful plugin allowing you to edit the WordPress dashboard menu manually. It has over 400,000 active installations. This plugin can rearrange menus, show or hide specific items, change permissions, and modify menu titles, URLs, and icons. The plugin also includes a drag-and-drop feature for rearranging items.
Another popular plugin with over 200,000 active installations is Adminimize. By hiding unnecessary items from the admin area, you can clean up the WordPress dashboard for users. You can remove items from view based on a user’s role in Adminimize, making it simple to control access to specific areas of the admin area.
Method #2: Removing Unnecessary WordPress Menu Items by Code
The remove_menu_page() WordPress function
This method removes items using the default menu slugs:
Menu Item | Menu Slug |
---|---|
Dashboard | index.php |
Jetpack | jetpack |
Posts | edit.php |
Media | upload.php |
Pages | edit.php?post_type=page |
Comments | edit-comments.php |
Appearance | themes.php |
Plugins | plugins.php |
Users | users.php |
Tools | tools.php |
Settings | options-general.php |
Remove "Comments" from the WordPress Dashboard
Copy + paste the below code into the Theme Functions (functions.php).
function hideUnncessaryMenuItems(){
remove_menu_page( 'edit-comments.php' );
}
add_action( 'admin_menu', 'hideUnncessaryMenuItems' );console.log( 'Code is Poetry' );
Remove "Media" from the WordPress Dashboard
function hideUnncessaryMenuItems(){
remove_menu_page( 'upload.php' );
}
add_action( 'admin_menu', 'hideUnncessaryMenuItems' );console.log( 'Code is Poetry' );
Remove "Users" from the WordPress Dashboard
function hideUnncessaryMenuItems(){
remove_menu_page( 'users.php' );
}
add_action( 'admin_menu', 'hideUnncessaryMenuItems' );console.log( 'Code is Poetry' );
Remove "Settings" from the WordPress Dashboard
function hideUnncessaryMenuItems(){
remove_menu_page( 'options-general.php' );
}
add_action( 'admin_menu', 'hideUnncessaryMenuItems' );console.log( 'Code is Poetry' );
Remove "Themes" or "Appearance" section from the WordPress Dashboard
function hideUnncessaryMenuItems(){
remove_menu_page( 'themes.php' );
}
add_action( 'admin_menu', 'hideUnncessaryMenuItems' );console.log( 'Code is Poetry' );
To summarize, removing unnecessary menu items from the WordPress admin area is a simple process. You can quickly declutter your admin area by using a plugin like Admin Menu Editor or Adminimize, which are powerful, easy to use, and have been downloaded and used by thousands of website owners. Always keep backups of your website and code before making any changes, so you can rely on these plugins to do the job correctly.
Sources/More Info:
https://wordpress.org/plugins/admin-menu-editor/
https://wordpress.org/plugins/adminimize/
https://www.wpbeginner.com/plugins/how-to-hide-unnecessary-items-from-wordpress-admin-with-adminimize/
https://www.webnots.com/remove-unnecessary-menu-items-from-wordpress-admin-panel/