Navigation menu permissions functionality allows you to set permission against each navigation menu item (front-end menu). While you are in the menu editing page, you will see some extra fields within each menu item edit box.
These fields allow you to set the permission for that menu item. Permission defines for which user the menu item will be displayed.
When a menu items is set for “All Users”, that item will display for all of your site visitors.
Logged in Users
When a menu items is set for “Logged in Users”, that item will only display for visitors who are logged into your site.
When a menu items is set for “Guest Users”, that item will only display for visitors who are not logged into your site.
Users by Role
This setting is only available in the PRO version. When you select this option, you will be able to select a list of roles and any user who belongs to any one of the selected roles will be able to see the menu.
Administrator role is selected by default and cannot be removed.
Permission Type on Title
The current user restriction type will be displayed alongside the title of the menu.
Parent Child Menu Permission
Child menu item will only be visible, if its parent menu item can be displayed.
In the above menu setting, Page 2, Page 3 & Page 4 will not be visible for guest users, even through Page 3 & Page 4 are set to display for all users, since their parent is not visible for guest users.
Navigation Menu Permissions Capability
“edit_nav_menu_permissions” capability is required to access the user restrictions section. This is a WPFront created capability. By default this capability is enabled for Administrator. When a user who do not have this capability is editing the menu, they won’t see the permission section and the existing permissions won’t get overwritten, they will still be applied as long as the menu item is not deleted.
Navigation Menu Permissions Settings
To disable navigation menu permissions, enable the “Disable Navigation Menu Permissions” setting in the Settings page. This will completely disable this functionality. This functionality is written to have minimal compatibility issues. If this functionality collides with any of your existing plugin/theme functionality, enable this setting.
Navigation Menu Permission Warning on Settings Page
When other plugins or your current theme is interfering with the navigation menu permission functionality, you will be presented with a warning similar to this in the settings page.
Try enabling the ‘Override Navigation Menu Permissions’ setting to get rid of this error, if it doesn’t work use the following work around.
Navigation menu permission works by replacing WordPress’s default menu walker (Walker_Nav_Menu_Edit) with a custom walker. Right now this is the only way for a plugin/theme can add extra fields into the menu edit page. When you have two or more plugins trying to add extra fields into your menu edit page (some themes also add extra fields), they will try to overwrite each others custom class. Finally one plugin/theme will win and you will see fields injected by that plugin/theme.
Some times you will see fields injected by multiple plugins on your menu edit page, this is because they have agreed to work together and programmed their plugins to be compatible with each other. WPFront User Role Editor is also compatible with some other plugins, but not every plugin out there. You will still see the warning, even if the plugin installed is compatible with WPFront User Role Editor. So the only way to confirm that it is working as normal is by looking for the extra fields in menu edit page.
This warning is only applicable for the menu edit page. Existing permissions will still work, even if you don’t see extra fields within the edit page (as long as the menu item is not deleted). So the good news is that, you can deactivate the plugin/theme that is conflicting, set your permissions then enable the plugin/theme back. And your permissions will still work.
Navigation menu permissions doesn’t limit visitors from accessing the page by directly typing the URL. To limit access to a page take a look into Extended Permissions.
Posts/Pages Extended Permissions
Media/Attachment File Permissions
Content Restriction Shortcodes