WordPress.org

Ready to get started?Download WordPress

Forums

how to remove submenu of the top level admin menu (4 posts)

  1. Memark
    Member
    Posted 4 years ago #

    hi guys,

    can you help me with this?
    currently i'm creating my own plugin in wordpress and when I reached on creating my own admin menu, I noticed that there is an extra sub menu created. For example I created a top-level menu called 'my menu' when I try to hover the menu a submenu is being displayed which is the same as on the top level menu. I would like to remove that one.

    Is there anybody who can help me. please.

    Thanks.

  2. Juergen Schulze
    Member
    Posted 3 years ago #

    Did you solve this?
    I have the same probloem right now.

  3. Memark
    Member
    Posted 3 years ago #

    Hi 1manfactory, yes I solved it. Check out the solution here http://alreymark.co.cc/2010/10/21/removing-admin-menus-and-submenus-in-wordpress-admin/

  4. Juergen Schulze
    Member
    Posted 3 years ago #

    Hello,
    thanks for answering.
    I found out by trial and error just a few minutes before reading the complete documentation.
    http://codex.wordpress.org/Adding_Administration_Menus
    ->
    In situations where a plugin is creating its own top-level menu, the first submenu will normally have the same link title as the top-level menu and hence the link will be duplicated. The duplicate link title can be avoided by calling the add_submenu_page function the first time with the parent and file parameters being given the same value.
    <-

Topic Closed

This topic has been closed to new replies.

About this Topic