Hide Menu Items Based on User Roles and Permissions

Restrict WordPress Nav Menu Items by User Role

I was recently introduced to a very useful plugin, which allows you to hide menu items based on whether a user is logged in or out, or beyond that, depending on their user role.

Nav Menu Roles tacks on the nav_menu functionality that was introduced in WP 3.0 (can you remember having to build menus by hand prior to that!?!) and adds a contextual menu to each menu item, where you can specify which users should be able to see each item.

You can choose from the more global settings of “All logged-in users” and “All logged-out users” to permissions that are based on each user’s individual role, so you can specify particular menu items to be hidden from subscribers, authors and contributors for instance, while being visible to editors and administrators.

You won’t really need me to provide you with any instructions, as once it’s installed, it’s incredibly evident how it works. Just select which menu item to impose a restriction on and select who should or should not see it.

Restrict WordPress Nav Menu Items by User Role

This is great for premium membership sites, so that you can provide easy links to premium content for logged-in users, or for providing a login and logout button in your menu, where the login button is only visible to logged-out users and the logout button is only visible to logged-in users. Smart huh!?

4 thoughts on “Hide Menu Items Based on User Roles and Permissions”

  1. Thanks for the heads-up on the plugin, Dave. Am I correct in assuming, however, that if I set a menu item to only be visible to Contributors, that the item will be available to Contributors and above? Or is it exclusive to that level? In the screen cap, they look like checkboxes, not radio buttons.

    Thanks!
    –Sean

    1. I haven’t tried it, but since they are checkboxes and not radio buttons, I would assume that you would have to check each box for each level that you wanted to see the menu item, not just the lowest level of a group that you want to be able to see it.

  2. lucasfogolin says:

    Is this compatible with multi site installations?

Leave a Reply