4 Best WordPress Navigation Menu Access Control Plugins

in WordPress Plugin on October 22, 2020

In the process of making a WordPress website, you may need to control the access rights to the navigation menu, such as displaying part of the menu for logged in users, hiding it for unlogged in users and so on. In some membership sites, this feature is still in demand.

Nav Menu Roles
This plugin lets you hide custom menu items based on user roles. So if you have a link in the menu that you want to show only to logged in users, some types of users or even only to unlogged in users, then this plugin is for you.

The navigation menu roles are very flexible. In addition to the standard user roles, you can customize the functionality by adding checkboxes with custom labels using the nav_menu_roles filter and then checking the desired criteria using the nav_menu_roles_item_visibility filter. You can check any user meta values (such as features) and any custom properties added by other plugins.

Important tips
In the WordPress menu, items and pages are completely separate entities. Navigation menu roles do not restrict access to content. The navigation menu role is only used to show/hide navigation menu items. If you wish to restrict access to content, you will also need to use the Membership plugin.

Nav Menu Roles is an older related plugin, it’s very simple and by default you can only set up access for non-logged in or logged in users, logged in users can choose their user role. That’s all, if you don’t require much, this is the plugin for you.

Nav Menu Roles

User Menus
The plugin allows you to apply visibility controls to menu items, such as who can see each menu item (everyone, logged out users, logged in users, specific user roles), which gives you better control over the navigation menu.

It also allows you to display logged-in user information in the navigation menu, such as “Hello, John Doe”. The plug-in also allows you to add login, registration and logout links to the menu.

Full Feature List
User Menus allows you to perform the following actions.

Show menu items to everyone
Show menu items only to logged out/unlogged in users
Display menu items to logged in users only
Show menu items to users with or without a specific user role.
Display the logged in user’s avatar {avatar} in a menu item with custom size options.
Show logged in user’s username {username} in menu items
Display the logged-in user’s name {first_name} in the menu item.
Display the logged in user’s last name {last_name} in the menu item.
Display the public display name {display_name} of the logged-in user in the menu item.
Show nicknames of logged in users in menu items
Display the login user’s email {email} in the menu item.
Add logout link to menu (optional redirect setting)
Adding the registration link to the menu (optional redirect setting)
Add login link to menu (optional redirect setting)
**Includes a custom menu importer that will allow the use of normal menu export/import to migrate user menu data.

User Menus – Nav Menu Visibility

If Menu

Based on the visibility rules, control which menu items are visible to visitors to the site. Here are some examples.

Display menu items only if the user is logged in (logged in status) in the following cases
Hide menu items Mobile access
Show menu items For some user roles
Hide login or registration links Logged in users
Display menu items Display by country and region
Display menu items only for certain membership levels.
Display menu items for visitors to browse For certain languages
The plugin is easy to use, each menu item will have a new option “Change visibility of menu items”, which will allow the selection of visibility rules.

Plugin Features
Basic Visibility Rule Set
User is logged in
User Role Admin Editor Author, etc.
Page type Front page Single page Single post
Archive pages (year, category, search results, etc.)
Guest Client Is Mobile
Advanced Visibility Rules – (paid version feature)
Visitor location – detecting the country of the visitor
Guest language – detects the language chosen by the visitor
WooCommerce Subscriptions – Display menu for users with active subscriptions.
WooCommerce Membership – Display menus for customers with a valid membership plan.
Grouping – detects if a user is in a specific group
WishList Member-Detects a user’s membership level
Restrict Content Pro – detects a user’s subscription level.
Multiple rules – mix multiple rules to make menu items visible
Displays whether User is logged in and Device is mobile.
Displays if User is Admin and Is front page.
Support for adding custom rules

If Menu – Visibility control for Menu Items

Menu Item Visibility Control

With this plugin, you can enable or disable menu items on the frontend using the WordPress conditional tag.

You have to insert a condition label in the “Visibility” box of the menu item option form. You can use any PHP or WordPress function to build crazy conditional and menu item logic. For example, to hide a menu item on the home page, you can set the visibility to: ! is_home()

Hide menu items for logged in users: ! is_user_logged_in()

Show menu items only to users with the ‘administrator’ role: in_array(‘administrator’, $GLOBALS[‘current_user’]->roles)

Menu Item Visibility Control

sum up
The above-mentioned four WordPress navigation menu access rights settings plugin, the general function is similar, give the following recommendations.

Nav Menu Roles is the oldest of these, and is relatively simple, with only the ability to set login and user roles.
User Menus has all the features of Nav Menu Roles, but with some additional links for logging in, logging out, and more!
If Menu is the most powerful plugin of this kind, it has the functions of Nav Menu Roles, but it is also compatible with some membership plugins (paid version) and supports multi-conditions stacking!
Menu Item Visibility Control has the most freedom for those familiar with WordPress conditional tags, but is only for advanced developers.
So, the final choice of which plugin to use depends on your own needs.

Categories: WordPress Plugin

Share Your Valuable Opinions