Restrict WordPress Nav Menu Items by User Role

Hide Menu Items Based on User Roles and Permissions

| 4 Comments

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!?

Categories: Plugins | Permalink

What next?

Hire me

If you couldn't quite manage this yourself, find it too intimidating, or just don't have the time to do it, you can always hire Dave to do it. Please get in touch so that we can discuss your needs.

Leave a comment

If you have a question, update, or comment about the tutorial, please leave a comment. I try and respond to every comment, though it may take a few days, so please check back soon.

Let a WordPress Expert help you

Do you want to try this, but feel like you need a helping hand, in case something goes wrong? My service, The WP Butler, gives you access to WordPress expertise whenever you need it. Better yet, I'll keep your site backed up, updated and secure, so that you don't have to worry about it. It's all part of the service. Use coupon DIWW and save 15% on all plans.

Visit The WP Butler

Author:

Dave has been tinkering with WordPress for many years, and he now shares his WordPress knowledge here on Do It WIth WordPress to help others realise its impressive power. He can also be hired to help with your WordPress needs. Dave, who is British, is married to his best friend, Marti, with whom he has a beautiful daughter, Ellie. When he's not dabbling with WordPress, he's probably eating Triscuits or hummus, watching an indie film or British TV show, spending time with friends or family, or exploring the world.

4 Comments

  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

    • 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. Is this compatible with multi site installations?

Leave a Reply