Nav Menu Roles
by HelgaTheViking 4.9 (218 reviews)

Nav Menu Roles

Hide custom menu items based on user roles.

Nav Menu Roles ranks #604 among WordPress.org plugins with 70,000+ active installations, is #98 of 8,289 in the Customization category, a 4.9/5 rating from 218 reviews, and was last updated Mar 27, 2026. Data from WordPress.org, refreshed twice daily — see methodology.

Tested up to WP 6.9.0 (Current: 7.0.2)
v2.1.3 Current Version v2.1.3
Updated 4 months ago Last Update on 27 Mar, 2026
Refreshed 10 hours ago Last Refreshed on
#98 of 8,289 in Customization Top 1% by installs
View on WordPress.org
Rank
#604
No change
Active Installs
70K+
No change
KW Avg Position
8.8
No change
Downloads
1.8M
+185 today
Support Resolved
0%
No change
Rating
98%
Review 4.9 out of 5
4.9 (218 reviews)

Next Milestone 80K

Total Progress 41.7%
70K+ 80K+
35
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro

Unlock Exact Install Count

See the precise estimated active installs for this plugin, calculated from real-time ranking data.

  • Exact install estimates within tiers
  • Track install growth over time
  • Milestone progress predictions
Upgrade to Pro
Need 5,834 more installs to reach 80K+

Rank Changes

573 588 604 620 635 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026
573 588 604 620 635 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026
571 587 603 619 635 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026
571 587 603 619 635 29-04-2026 30-04-2026 01-05-2026 02-05-2026 03-05-2026 04-05-2026 05-05-2026 06-05-2026 07-05-2026 08-05-2026 09-05-2026 10-05-2026 11-05-2026 12-05-2026 13-05-2026 14-05-2026 15-05-2026 16-05-2026 17-05-2026 18-05-2026 19-05-2026 20-05-2026 21-05-2026 22-05-2026 23-05-2026 24-05-2026 25-05-2026 26-05-2026 27-05-2026 28-05-2026 29-05-2026 30-05-2026 31-05-2026 01-06-2026 02-06-2026 03-06-2026 04-06-2026 05-06-2026 06-06-2026 07-06-2026 08-06-2026 09-06-2026 10-06-2026 11-06-2026 12-06-2026 13-06-2026 14-06-2026 15-06-2026 16-06-2026 17-06-2026 18-06-2026 19-06-2026 20-06-2026 21-06-2026 22-06-2026 23-06-2026 24-06-2026 25-06-2026 26-06-2026 27-06-2026 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026
Current #604
Change
Best #

Upgrade to Pro

Unlock 30-day and 90-day rank history charts with a Pro subscription.

Upgrade Now

Active Installs Growth

Active Installs 0,000,000+
Growth +0.0%
Peak 0,000,000

Downloads Growth

100 150 200 250 300 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026
100 150 200 250 300 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026
100 150 200 250 300 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026
0 500 1K 1.5K 29-04-2026 02-05-2026 05-05-2026 08-05-2026 11-05-2026 14-05-2026 17-05-2026 20-05-2026 23-05-2026 26-05-2026 29-05-2026 01-06-2026 04-06-2026 07-06-2026 10-06-2026 13-06-2026 16-06-2026 19-06-2026 22-06-2026 25-06-2026 28-06-2026 01-07-2026 04-07-2026 07-07-2026 10-07-2026 13-07-2026 16-07-2026 19-07-2026 22-07-2026 25-07-2026 28-07-2026
0 5K 10K 15K 28-07-2025 09-08-2025 21-08-2025 02-09-2025 14-09-2025 26-09-2025 08-10-2025 20-10-2025 01-11-2025 13-11-2025 25-11-2025 07-12-2025 19-12-2025 31-12-2025 12-01-2026 24-01-2026 05-02-2026 17-02-2026 01-03-2026 13-03-2026 25-03-2026 06-04-2026 18-04-2026 30-04-2026 12-05-2026 24-05-2026 05-06-2026 17-06-2026 29-06-2026 11-07-2026 23-07-2026 28-07-2026
Downloads
Growth
Peak

Upgrade to Pro

Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.

Upgrade Now

Reviews & Ratings

4.9
218 reviews
Overall 98%
5
212 (97%)
4
2 (1%)
3
1 (0%)
2
0 (0%)
1
3 (1%)

Tracked Keywords

Showing 4 of 4
Keyword Position Change Type Updated
nav menus 2 Tag 22 hours ago
nav menu 4 Tag 22 hours ago
menus 9 Tag 22 hours ago
menu 20 Tag 22 hours ago

Unlock Keyword Analytics

Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.

  • Full keyword position tracking
  • Historical ranking data
  • Competitor keyword analysis
Upgrade to Pro

Support Threads Overview

Resolved
Unresolved
1
Total Threads
0
Resolved
1
Unresolved
0%
Resolution Rate

Security History

Source: WPVulnerability

No known vulnerabilities on record for Nav Menu Roles. Checked 5 hours ago.

TL;DR

AI summary of the plugin's readme

This plugin is for WordPress site owners who use custom navigation menus and want to control visibility based on user roles. It solves the problem of showing or hiding menu items for logged in users, logged out users, or specific roles, without restricting access to the underlying content.

  • Hide menu items by user role
  • Show items to logged in users
  • Show items to logged out users
  • Display Mode set to everyone
  • Custom role checkboxes via filter
  • nav_menu_roles_item_visibility filter
  • Check user meta and capabilities
  • Minimum role visibility requirement

Frequently Asked Questions

Common questions about Nav Menu Roles

This is likely due to a conflict with another plugin (or theme). As of WordPress 5.4 the wp_nav_menu_item_custom_fields hook has been added to WordPress core. Nav Menu Roles is therefore attaching directly to this hook without needing to replace the custom Admin Menu Walker, of which there can still be only one. If the Walker is replaced by a theme/plugin and the core hook is not included, then Nav Menu Roles cannot add it's fields. A non-exhaustive list of known conflicts: UberMenu 2.x Mega Menus plugin (UberMenu 3.x supports NMR!) Add Descendants As Submenu Items plugin Navception plugin Suffusion theme BeTheme Yith Menu Jupiter Theme iMedica theme Prostyler EVO theme Mega Main Plugin Workaround #1 Shazdeh had the genius idea to not wait for a core hook and simply add the hook ourselves. If all plugin and theme authors use the same hook, we can make our plugins play together. Prior to WordPress 5.4, I used this idea and modified my admin nav menu Walker to only adding the following lines (right after the description input): <?php // Place this in your admin nav menu Walker
// end added section ?> Since WordPress 5.4, I no longer replace the Walker at all and would advise other plugins and themes to do the same. But for those that still are, they definitely need to include the now-core hook. Ask your conflicting plugin/theme's author to add this code to their plugin or theme and our plugins will become compatible. Instructions for Patching Your Plugin/Theme
Reminder: I do not provide support for fixing your plugin/theme. If you aren't comfortable with the following instructions, contact the developer of the conflicting plugin/theme! 1. Find the class that extends the Walker_Nav_Menu. The fastest way to do this is to search your whole plugin/theme folder for extends Walker_Nav_Menu. When you find the file that contains this text you will know which file you need to edit. Once you find it here's what the beginning of that class will look like: class YOUR_THEME_CUSTOM_WALKER extends Walker_Nav_Menu {} 2. Find the start_el() method In that file you will eventually see a class method that looks like: function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { // some stuff truncated for brevity } 3. Paste the action hook somewhere in this method! In Nav Menu Roles, I have placed the hook directly after the description, like so: <p class="field-description description description-wide"> <label for="edit-menu-item-description-<?php echo $item_id; ?>"> <?php _e( 'Description' ); ?><br /> <textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); // textarea_escaped ?></textarea> <span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span> </label> </p> <?php // Add this directly after the description paragraph in the start_el() method
// end added section ?> Workaround #2 As a workaround, you can switch to a default theme (or disable the conflicting plugin), edit the Nav Menu Roles, for each menu item, then revert to your original theme/ re-enable the conflicting plugin. The front-end functionality of Nav Menu Roles will still work. Workaround #3 Only works with WordPress less than 5.4.
There are apparently a few membership plugins out there that don't use traditional WordPress roles/capabilities. My plugin will list any role registered in the traditional WordPress way. If your membership plugin is using some other system, then Nav Menu Roles won't work with it out of the box. Since 1.3.5 I've added a filter called nav_menu_roles_item_visibility just before my code decides whether to show/hide a menu item. There's also always been the nav_menu_roles filter which lets you modify the roles listed in the admin. Between these two, I believe you have enough to integrate Nav Menu Roles with any membership plugin. Here's an example where I've added a new pseudo role, creatively called "new-role". The first function adds it to the menu item admin screen. The second function is pretty generic and won't actually do anything because you need to supply your own logic based on the plugin you are using. Nav Menu Roles will save the new "role" info and add it to the item in an array to the $item->roles variable. Existing Compatibility Plugins Wishlists Memberships WooCommerce Memberships If your membership plugin is not listed here, you may be able to use the above bridge plugins as a template. Scroll down to the bottom of the main plugin file and you will see a section for "Helper Functions". If you modify the 3 wrapper functions according to your membership plugin's logic, the rest of the plugin should handle the integration with Nav Menu Roles. Adding a new "role" The roles in NMR are filterable distinct from the global $wp_roles. This allows for compatibility to be added between plugins that don't use the core roles to determine access, like some membership plugins. /** * Add custom roles to Nav Menu Roles menu list * param: $roles an array of all available roles, by default is global $wp_roles * return: array */ function kia_new_roles( $roles ) { $roles['new-role-key'] = 'new-role'; return $roles; } add_filter( 'nav_menu_roles', 'kia_new_roles' ); Note, if you want to add a WordPress capability the above is literally all you need. Because Nav Menu Roles checks whether a role has permission to view the menu item using current_user_can($role) you do not need to right a custom callback for thenav_menu_roles_item_visibility` filter. In case you do need to check your visibility status against something very custom, here is how you'd go about it: /** * Change visibility of each menu item * @param bool $visible * @param obj $item The complete menu object. Nav Menu Roles adds its info to the following keys { * roles - Possible value: "in" (all logged in) | "out" (all logged out) | an array of specific roles, ex: [ "administrator", "editor" ] * display_mode - Possible values: "show" (show if conditions met) | "hide" (hide if conditions met) * return boolean */ function kia_item_visibility( $visible, $item ) { if ( isset( $item->roles ) && is_array( $item->roles ) && in_array( 'new-role-key', $item->roles ) ) { /* if ( // your own custom check on the current user versus 'new-role' status ) { $visible = true; } else { $visible = false; } */ } return $visible; } add_filter( 'nav_menu_roles_item_visibility', 'kia_item_visibility', 10, 2 ); Note that you have to generate your own if/then logic. I can't provide free support for custom integration with another plugin. You may contact me to discuss hiring me, or I would suggest using a plugin that supports WordPress' roles, such as Justin Tadlock's Members. Sort the roles alphabetically Add the following snippet to your theme's functions.php file: /* * Sort the NMR roles * @param: $roles an array of all available roles with ID=>Name * @return: array */ function kia_sort_roles( $roles ) { if ( is_admin() ) { $array_lowercase = array_map( 'strtolower', $roles ); array_multisort( $array_lowercase, SORT_ASC, SORT_STRING, $roles ); return $roles; } } add_filter( 'nav_menu_roles', 'kia_sort_roles' );
If every item in your menu is configured to display to logged in users (either all logged in users, or by specific role), then when a logged out visitor comes to your site there are no items in the menu to display. wp_nav_menu() will then try check its fallback_cb argument... which defaults to wp_page_menu. Therefore, if you have no items to display, WordPress will end up displaying ALL your pages!! If you don't want this, you must set the fallback argument to be a null string. wp_nav_menu( array( 'theme_location' => 'primary-menu', 'fallback_cb' => '' ) ); You must do this for every effected instance of wp_nav_menu() in your theme templates. It is not possible for me to tell you where they are located, but header.php is a very common location for the main menu. Alternatively, you could do this universally by adding the following snippet to your child theme's function.php file or by adding it via the Code Snippets plugin: /** * Disables the fallback page menu for all menus * * @param array $args Array of wp_nav_menu() arguments. * @return array */ function kia_nav_menu_args( $args ) { $args['fallback_cb'] = ''; return $args; } add_filter( 'wp_nav_menu_args', 'kia_nav_menu_args' );
The Nav Menu Roles plugin stores 1 piece of post meta to every menu item/post. This is exported just fine by the default Export tool.
Go to Tools>Export, choose to export All Content and download the Export file Go to Tools>Import on your new site and perform your normal WordPress import Return to Tools>Import and this time select the Nav Menu Roles importer. Use the same .xml file and perform a second import No duplicate posts will be created but all menu post meta (including your Nav Menu Roles info) will be imported
Yes, but manually. WPML developers have informed me that the meta data for nav menu items is not synced by WPML, meaning that menus copied into a new language will not bring their custom Nav Menu Roles settings. However, if you manually reconfigure the settings, the new language menu will work as expected.

More plugins by HelgaTheViking

Sign In / Register

You need to sign in or register to use this feature.