WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Long story short, I am creating an Administration UI for my Homepage Slider, therefore I am hooking to the admin_menu as explained in the wordpress codex.

Basically, structure wise, I have only to pages:

  1. A page with all the slides - 'View All Slides'
  2. A page to add a new slide - 'Add New Slide'

I want all of the above to go under 'Homepage Slider' category. To get a better idea think how 'Pages' is displayed in the Dashboard.

Nevertheless, here is my menu function:

add_action('admin_menu', 'bones_home_slider_menu');

function home_slider_menu() {
    add_menu_page('Homepage Slider View',
        'Homepage Slider',

        'Add New Slide',
        'Add New',


The problem is that add_menu_page creates the main menu item and a submenu when used with 'add_submenu_page':

enter image description here

I've tried to create another submenu, however I don't know how to make 'Homepage Slider' disappear from the submenu.

share|improve this question
look this answer. wordpress.stackexchange.com/questions/34363/… – ahmetlutfu May 31 '14 at 23:32
Thanks, that helped. – Dragos Rizescu Jun 1 '14 at 8:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.