How to Remove Unused Menu Items from the WordPress Dashboard

September 9, 2025
How to Remove Unused Menu Items from the WordPress Dashboard

The WordPress admin dashboard includes menu items for posts, pages, comments, tools, and more. However, not all of these are necessary for every site. For example, you might not use the “Comments” section or want to hide “Tools” from clients. You can clean up the dashboard by removing unused menu items.

Method 1: Using remove_menu_page() in functions.php

The remove_menu_page() function allows you to hide specific items from the main admin menu.

// Remove unused menu items
function my_remove_menus() {
    remove_menu_page('edit-comments.php');   // Comments
    remove_menu_page('tools.php');           // Tools
    remove_menu_page('edit.php');            // Posts
    remove_menu_page('upload.php');          // Media
}
add_action('admin_menu', 'my_remove_menus');

Common menu slugs include:

  • index.php – Dashboard
  • edit.php – Posts
  • upload.php – Media
  • link-manager.php – Links (if enabled)
  • edit.php?post_type=page – Pages
  • edit-comments.php – Comments
  • themes.php – Appearance
  • plugins.php – Plugins
  • users.php – Users
  • tools.php – Tools
  • options-general.php – Settings

Method 2: Using remove_submenu_page() for Submenus

If you only want to remove a submenu item (for example, “Theme Editor” under Appearance), use remove_submenu_page().

// Remove theme editor from Appearance
function my_remove_submenus() {
    remove_submenu_page('themes.php', 'theme-editor.php');
}
add_action('admin_menu', 'my_remove_submenus', 999);

Method 3: Restrict Menu Items by User Role

You may want to hide certain menus only for specific roles, like Contributors or Editors. Wrap your functions in a capability check:

// Hide menu items for non-admins
function my_role_based_menus() {
    if (!current_user_can('administrator')) {
        remove_menu_page('tools.php');
        remove_menu_page('plugins.php');
    }
}
add_action('admin_menu', 'my_role_based_menus');

Method 4: Use a Plugin

If you prefer not to edit code, plugins provide an easy interface to manage menus:

  • Adminimize – Hide menus, widgets, and dashboard items per role.
  • User Role Editor – Control capabilities and menu visibility.

Summary

To remove unused menu items in WordPress, use remove_menu_page() for top-level menus and remove_submenu_page() for submenus. For role-specific customization, combine these functions with capability checks. If you want a no-code approach, plugins like Adminimize can simplify the process. Cleaning up the dashboard makes it easier for clients and editors to focus only on what matters.

Avatar

Written by

satoshi

I’ve been building and customizing WordPress themes for over 10 years. In my free time, you’ll probably find me enjoying a good football match.