Restrict WordPress Nav Menu Items by User Role

Hide Menu Items Based on User Roles and Permissions

| 2 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.

Keep your site backed up, updated & secure

I provide a service called The WP Butler, which helps you stay on top of the maintenance of your WordPress site. Instead of worrying about whether your site is secure, updated and backed up, The WP Butler handles all that for you on a regular basis, so that you can focus on doing what you do best. If you use coupon DIWW, you'll save 15% on our already-low-prices for all maintenance plans.

Author: Dave Clements

Dave Clements has been building websites for close to a decade and in 2010, he formalised that by starting his own company, The UK Edge. He now works on a variety of web projects, from simple tasks like installing a new WordPress site, to consulting on problems, or redesigning his clients' sites. He also runs Do It With WordPress, a site dedicated to providing free tutorials on WordPress. When he's not building your new website, you can find Dave eating Wheat Thins, spending time with friends and family, watching Indie films, fostering kittens from the local Humane Society, listening to some dubstep, dance and electronic rock, and exploring the world.

2 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.

Leave a Reply