Title: Plugin Menu Naming
Last modified: August 20, 2016

---

# Plugin Menu Naming

 *  [doolezah](https://wordpress.org/support/users/doolezah/)
 * (@doolezah)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-menu-naming/)
 * Hi folks,
 * I hope this is a simple question to answer. First, let me give some brief context
   before asking the question.
 * The built-in WordPress admin menus function in a way that the main menu title
   points to the first submenu item. An example is the Settings menu. When you click
   on the Settings menu, it displays the General Settings page and highlights the
   first submenu item entitled “General.” Visually, this is what I am talking about(
   the menu items are displayed in bold below):
 * **Settings
    – General
   
    – Writing – Reading …
 * I want to achieve this same functionality with my plugin menu, but my first submenu
   item is the same name as the entire plugin menu. How do I change it? Below is
   a visual representation of the results I see:
 * **Custom
    – Custom
   
    – Misc. Settings
 * The code I am using is found below:
 *     ```
       function custom_plugin_menu()
       {
       	add_menu_page('Custom', 'Custom', 'manage_options', 'custom-plugin', 'custom_option_page');
       	add_submenu_page('custom-plugin','Misc. Settings', 'Misc. Settings', 'manage_options', 'custom-plugin2', 'custom_option_page2');
       }
       add_action('admin_menu', 'custom_plugin_menu');
       ```
   
 * Thanks for any help in advance!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-menu-naming/#post-3323058)
 * I’m not sure why it’s done that way, but you can remove the Custom submenu by
   adding this to your action hook function:
    `remove_submenu_page( 'custom-plugin','
   custom-plugin' );`
 *  [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-menu-naming/#post-3323151)
 * The answer is in the codex: [http://codex.wordpress.org/Function_Reference/add_submenu_page](http://codex.wordpress.org/Function_Reference/add_submenu_page)
 * >  **$menu_slug**
   >  (string) (required) The slug name to refer to this menu by(
   > should be unique for this menu). **If you want to NOT duplicate the parent 
   > menu item, you need to set the name of the $menu_slug exactly the same as the
   > parent slug.**

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin Menu Naming’ is closed to new replies.

## Tags

 * [add_menu_page](https://wordpress.org/support/topic-tag/add_menu_page/)
 * [add_submenu_page](https://wordpress.org/support/topic-tag/add_submenu_page/)
 * [admin menus](https://wordpress.org/support/topic-tag/admin-menus/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 3 participants
 * Last reply from: [AntoineH](https://wordpress.org/support/users/antoineh/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-menu-naming/#post-3323151)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
