Admin Menu Editor For WordPress

Admin Menu Editor is a WordPress plugin that will let you manually edit the Dashboard menu. You can reorder the menus, show/hide specific items, change access rights, and more.

Features

  • Sort menu items any way you want by simple drag & drop.
  • Move a menu item to a different submenu via cut & paste.
  • Edit any existing menu – change the title, access rights, menu icon and so on. Note that in the free version you can’t relax menu permissions – i.e. give access rights to a role that originally didn’t have them – but you can change them to be more restrictive.
  • Hide/show any menu or menu item. A hidden menu is invisible to all users, including administrators.
  • Create custom menus that point to any part of the Dashboard. For example, you could create a new menu leading directly to the “Pending comments” page.

Here’s a screenshot :

Admin Menu Editor screenshot

This plugin also has a Pro version that offers a bunch of extra features.

Download

admin-menu-editor.zip

The latest version of the plugin is always available on WordPress.org.

Requirements :

  • WordPress 4.1 or later
  • PHP 5.2 or later

Known Issues

The basic idea for the plugin was suggested by several commenters way back in October. However, the internal menu system that WordPress uses is obscure and unsuitable for direct manipulation, so I spent quite a while inventing workarounds. And even after a few weeks of pondering, there are some things I haven’t quite fixed.

  • If you delete any of the default menus they will reappear after saving. This is not a bug, it’s a feature 😉
  • As I mentioned before, the access rights required for using a particular menu item can’t be lowered, but can be made more strict. This has been fixed in the Pro version.
  • Plugin menus that are moved to a different submenu will not work unless you put the full page URL in the “URL” field. This is because WP “ties” the menu item to it’s parent menu and won’t recognize it in a different submenu.
Related posts :

554 Responses to “Admin Menu Editor For WordPress”

  1. Jānis Elsts says:

    The left bar (that is, the admin menu) is part of the admin dashboard. I don’t think there is an easy way to display it outside the dashboard.

    In the Pro version you could configure the link to open in an iframe so the menu would still be visible, but it might be overkill to buy a license just for that one feature.

  2. Adam says:

    For me, the most imporant plugin. Thanks!

  3. thiarara says:

    changed something and cant access my wp-admin using /wp-admin/?reset_admin_menu=1 but not resetting
    am getting “There has been a critical error on this website. Please check your site admin email inbox for instructions.”

  4. Jānis Elsts says:

    I responded to you via email based on your contact form submission. I’ll summarize here: “critical error” usually means a PHP fatal error, check the PHP error log for details. You can deactivate the plugin by renaming its directory to something else, which may help if the error is related to the current menu configuration.

  5. tomek says:

    hi jānis,

    hoping that my question isn’t to root…
    i just changed into the wordpress, php development technologies, coming from javascript, google apps script, html, css … anyway … here it comes!

    i did manage to let my plugin have its backend admin menu entries. i felt a little surprised that the first option is always the menu name and (native wordpress menus do themself have a different name) couldn’ figure out how to rename the first option name = main menu name.

    than i came across your magic plugin and it was easy for me to change the first option = main menu to a UI making sense name.

    please understand that i will not distribute my plugin (btw, its free one (none commercial) app for small vehicle garages and have your plugin as a prerequisite! sorry!!!!

    so here it comes…
    would you anyway share with me the php (maybe java, html, css) code needed to implement the different naming in my plugin. no fancy settings page, etc. would be more that appreciated for a static, native function?

    cheers
    tomek

  6. Jānis Elsts says:

    So are you asking how to rename an existing admin menu item using PHP? The answer is basically to find the item in the global $menu or $submenu array and to change the first value of the item (index 0) to the new title.

    For example, let’s say you have a top-level menu with the slug “abc” and you want to change the title of the first submenu item. You could do it like this:


    global $submenu;
    $submenu['abc'][0][0] = 'New title';

    In this case, the first “0” is the index of the menu item and the second “0” is the index of the menu title property. In practice, you will often need some additional code to find the menu item you want to modify because it might not be at index 0 (the title will still be at index 0, though). To identify the correct item, I recommend checking index 2 which contains the menu slug or URL.

    This is essentially the same thing that Admin Menu Editor does, but the actual plugin code is much more complex because the plugin does many other things, too.

  7. Marten says:

    Hi Janis,
    I have a problem with Admin Menu Editor. For some plugins, after saving a form, the system jumps to the wrong menu item in the dashboard menu.
    Disabling Admin Menu Editor solves the problem, so it is the origin of the problem.

    Have you a clue about what is going wrong?

    Kind regards

  8. Jānis Elsts says:

    To debug something like that, I would need to know the specific plugin and form so that I can reproduce the problem locally. I doubt I can guess the reason otherwise.

    Very broadly, AME includes some code that attempts to find and highlight the menu item that matches the current page’s URL. This is particularly important if you move a submenu item away from its original menu because WordPress itself will often highlight the wrong menu when that happens. There could be a bug in that code.

    Or maybe the plugins that you’re using have their own custom menu selection code that conflicts with AME somehow. Or maybe the plugins create hidden admin menu items which become visible (and highlighted) due to a different kind of conflict.

  9. Marten says:

    Hi Janis,
    Thanks for your reaction. The plugins I’m using do not have custom menu selection, so it is probably AME that does it wrong.
    Can you tell me in which part of the code the selection is done, so I can try to debug myself.

    Regards,

    Marten

  10. Jānis Elsts says:

    The relevant code is in admin-menu-editor/js/menu-highlight-fix.js

  11. Marten says:

    Thanks. I’ll try to discover the problem.

  12. Marten says:

    I have made some debug traces with the menu-highlight-fix.
    First I removed most of the plugins from the site. Only AME, ShiftController and SpiffyCalendar remain. When an event is saved in SpiffyCalendar the menu link to ShiftController appears to be a link to SpiffyCalendar, which is choosen in the fix-algorithm as the best option. I think not the menu-highlight-fix is the problem, but there is something mysterious with the structure of the admin menu. I did not manage to discover what.
    Do you have a clue?

    Kind regards,

    Marten

  13. Jānis Elsts says:

    Again, hard to say anything without reproducing the problem, but one additional test I would recommend is to also deactivate AME and see if the menu links change. That is, do the links change 1) after deactivating AME, and 2) does the ShiftController link still change to SpiffyCalendar when an event is saved. If all of that stays the same as when AME is active, it could at least rule out the possibility that the problem is in the AME menu configuration.

  14. Marten says:

    Indeed after deactivating AME and saving a SpiffyCalendar event, the ShiftController link refers to SpiffyCalendar. So the problem seems not to be the AME menu configuration.
    I’ll examine ShiftController.

    Thanks for your time 🙂

Leave a Reply