How to Show Different Menus to Different WordPress Users
There are all sorts of reasons for wanting to show certain menus to some users but not others.
As many visitors to WPMU DEV often build or run sites for clients, let’s take a simple client example.
Let’s say you have a client that needs things to be as easy as possible. This client accesses the site by going to the homepage first. They can easily get to the admin area from there, but what if they aren’t logged in? On many sites, there is no easy link to the login page.
For someone not familiar with WordPress, not being able to easily log in to your own site from the homepage seems absolutely ludicrous. (And let’s be honest, it pretty much is.)
So how about putting a link to the admin area right at the top of the main menu that only someone with Editor or Admin permissions will see?
Problem solved. The client knows the link is always there – very first thing on the most important menu.
Showing and Hiding Menu Items
You can easily do the above with a plugin called Nav Menu Roles.
This plugin lets you hide menu items based on user levels or even whether a user is logged in or logged out.
You’ll find the settings on each individual menu item when you set up a menu in your admin area. (Appearance > Menus).
If nothing is checked, then the menu items display to everyone as they normally would. Once you begin checking, however, then only those users will be able to see that particular menu item.
A very handy plugin that opens up a lot of possibilities.
Photo: sidewalk menus