The Admin Menu is usually what authenticated (logged-in) users see in the Website dashboard on the left hand side. If you are the main administrator of your website and you want to grant access for other users to manage content, sometimes it is very important to limit the number of menus that additional user can utilize.
AAM is a great tool that not only filters the menu for authenticated users, but can also completely restrict access to it. But before we jump into the practical aspect of this feature, let’s take our time and understand how the WordPress menu works.
Each menu or submenu item in the WordPress Dashboard has one or more capabilities assigned to it (if you are not familiar with capabilities, check this tutorial). For example, to the left, notice that the Menu ‘Posts’ has the capability Edit Posts. The ‘Posts’ submenu Categories has the capability Manage Categories. It is very easy to find out what capability is assigned to each default WordPress menu and submenu in official tutorial Roles & Capabilities.
But when you are using a custom plugin or theme, it often adds its own menu to the Admin Menu panel. When this happens, it is quite complicated for someone who is unfamiliar with programming to find out what capability is assigned to the custom menu.
Every day, we receive at least few emails with the question, “why doesn’t my user see this or that menu?”. The answer is simple. Your user does not have the correct capabilities to see or use that menu. You have to either find out by yourself what capability that menu has, or contact the plugin’s developer and ask him or her about it. As soon as you know the answer, you can grant the proper capability to your user role or user.
For your convenience, in AAM 2.x we filter the menu list based on capabilities that your user role or user has. Try changing the Administrator Role to Author Role and you’ll see that the list of menus is much shorter. This is because the Author Role in WordPress does not have the same complete list of capabilities as the Administrator Role does.
As a side note- Some custom plugins like Gravity Forms or Contact Form 7 add additional menus to the Admin Menu Panel, inject capabilities dynamically, and do not save them to WordPress database. In cases like these, you have to find out what capabilities are used by the custom plugin and add them manually. See this conversation for additional information.
You can restrict access to individual submenus by checking the checkbox next to the submenu name. As you might know, WordPress, by default, redirects users to the first submenu if the user clicks on a menu item. For example if a user clicks on the Posts menu, the user will be automatically directed to the All Posts submenu.
If you restricted the All Posts submenu, AAM will redirect the user to the first available submenu in the order these submenus are rendered. If all submenus are restricted, or the Restrict All checkbox is checked, then the entire menu and all submenus will be filtered and the user will not have access to any of them.
Currently we do not allow the ability to manage the order of items in the menu as was available in AAM 1.x versions, however we will include it in our future releases.