{"id":171636,"date":"2023-03-17T05:47:44","date_gmt":"2023-03-17T05:47:44","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/hide-menu-items-by-role\/"},"modified":"2026-05-26T18:35:50","modified_gmt":"2026-05-26T18:35:50","slug":"hide-menu-items-by-role","status":"publish","type":"plugin","link":"https:\/\/zgh.wordpress.org\/plugins\/hide-menu-items-by-role\/","author":20917848,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.0","stable_tag":"2.0.0","tested":"7.0.0","requires":"5.0","requires_php":"7.0","requires_plugins":null,"header_name":"Hide Menu Items by Role","header_author":"Mahfuzur Rahman","header_description":"Hide specific navigation menu items based on user role","assets_banners_color":"3757e6","last_updated":"2026-05-26 18:35:50","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/hide-menu-items-by-role","header_author_uri":"https:\/\/www.linkedin.com\/in\/mahfuzd","rating":0,"author_block_rating":0,"active_installs":60,"downloads":2038,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"mahfuzurwp","date":"2024-12-01 06:47:04"},"2.0.0":{"tag":"2.0.0","author":"mahfuzurwp","date":"2026-05-26 18:35:50"}},"upgrade_notice":{"2.0.0":"<ul>\n<li>Major update with new features: login state controls and show\/hide mode toggle<\/li>\n<li>Please update to take advantage of enhanced visibility controls<\/li>\n<\/ul>","1.0.1":"<ul>\n<li>Compatibility update for WordPress 6.7.1<\/li>\n<\/ul>","1.0.0":"<ul>\n<li>Initial release.<\/li>\n<\/ul>"},"ratings":[],"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":3211182,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3211202,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3211202,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","2.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":2881769,"resolution":"1","location":"assets","locale":"","width":1192,"height":562},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":3549622,"resolution":"2","location":"assets","locale":"","width":2980,"height":2196}},"screenshots":{"1":"Plugin shown in plugins page.","2":"Adding user roles and visibility settings in menus page."}},"plugin_section":[],"plugin_tags":[178983,1865,1753,1915,11917],"plugin_category":[43,58],"plugin_contributors":[219142],"plugin_business_model":[],"class_list":["post-171636","plugin","type-plugin","status-publish","hentry","plugin_tags-hide-menu-items","plugin_tags-menu","plugin_tags-navigation","plugin_tags-roles","plugin_tags-user-roles","plugin_category-customization","plugin_category-user-management","plugin_contributors-mahfuzurwp","plugin_committers-mahfuzurwp"],"banners":{"banner":"https:\/\/ps.w.org\/hide-menu-items-by-role\/assets\/banner-772x250.png?rev=3211202","banner_2x":"https:\/\/ps.w.org\/hide-menu-items-by-role\/assets\/banner-1544x500.png?rev=3211202","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/hide-menu-items-by-role\/assets\/icon.svg?rev=3211182","icon":"https:\/\/ps.w.org\/hide-menu-items-by-role\/assets\/icon.svg?rev=3211182","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/hide-menu-items-by-role\/assets\/screenshot-1.jpg?rev=2881769","caption":"Plugin shown in plugins page."},{"src":"https:\/\/ps.w.org\/hide-menu-items-by-role\/assets\/screenshot-2.jpg?rev=3549622","caption":"Adding user roles and visibility settings in menus page."}],"raw_content":"<!--section=description-->\n<p>This plugin allows you to control menu item visibility based on user roles and login status. You can:<\/p>\n\n<ol>\n<li>Hide menu items from specific user roles (original functionality)<\/li>\n<li>Show menu items only to specific user roles (new \"show\" mode)<\/li>\n<li>Control visibility based on login status (Everyone, Logged-in only, Logged-out only)<\/li>\n<\/ol>\n\n<p>The plugin uses WordPress core filters, so no JavaScript or jQuery is required.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the \/wp-content\/plugins\/ directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress.<\/li>\n<li>Create or edit a menu item, and configure the visibility settings:\n\n<ul>\n<li>Select which user roles should affect visibility<\/li>\n<li>Choose between \"Hide from these roles\" or \"Show only to these roles\"<\/li>\n<li>Set login state visibility (Everyone, Logged-in only, Logged-out only)<\/li>\n<\/ul><\/li>\n<li>Save your menu.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20control%20who%20can%20see%20a%20menu%20item%3F\"><h3>How do I control who can see a menu item?<\/h3><\/dt>\n<dd><p>When you create or edit a menu item, new fields will appear where you can:\n1. Select which user roles should affect visibility\n2. Choose between \"Hide from these roles\" (default) or \"Show only to these roles\"\n3. Set login state visibility:\n   - Everyone (no restriction)\n   - Logged-out users only\n   - Logged-in users only<\/p><\/dd>\n<dt id=\"can%20i%20hide%20menu%20items%20for%20multiple%20user%20roles%3F\"><h3>Can I hide menu items for multiple user roles?<\/h3><\/dt>\n<dd><p>Yes, you can select multiple user roles that should be affected by the visibility rules.<\/p><\/dd>\n<dt id=\"what%27s%20the%20difference%20between%20%22hide%20from%20these%20roles%22%20and%20%22show%20only%20to%20these%20roles%22%3F\"><h3>What's the difference between \"Hide from these roles\" and \"Show only to these roles\"?<\/h3><\/dt>\n<dd><ul>\n<li>\"Hide from these roles\": Menu item is visible to everyone EXCEPT the selected roles (original behavior)<\/li>\n<li><p>\"Show only to these roles\": Menu item is visible ONLY to the selected roles (new behavior)<\/p>\n\n<p>Note: When using \"Show only to these roles\", if no roles are selected, the item will be visible to everyone (to avoid accidentally hiding items during setup).<\/p><\/li>\n<\/ul><\/dd>\n<dt id=\"how%20does%20the%20login%20state%20visibility%20work%3F\"><h3>How does the login state visibility work?<\/h3><\/dt>\n<dd><p>The login state setting works independently of role-based rules:\n- Everyone: No restriction based on login status\n- Logged-out users only: Item is only visible to visitors who are not logged in\n- Logged-in users only: Item is only visible to users who are logged in<\/p>\n\n<p>If the login state rule is set to 'Logged-out users only', the role-based rules are not checked (for performance).<\/p><\/dd>\n<dt id=\"how%20do%20i%20change%20the%20visibility%20settings%20for%20a%20menu%20item%3F\"><h3>How do I change the visibility settings for a menu item?<\/h3><\/dt>\n<dd><p>When you create or edit a menu item, the visibility fields will appear where you can modify:\n- The selected user roles\n- The visibility mode (hide\/show)\n- The login state setting<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Added login state visibility control (Everyone\/Logged-out only\/Logged-in only)<\/li>\n<li>Added show\/hide mode toggle (Hide from these roles \/ Show only to these roles)<\/li>\n<li>Added UI enhancements: when login state is 'Logged-out users only', other fields are visually disabled<\/li>\n<li>Major feature update with enhanced visibility controls<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Updated for compatibility with WordPress 6.7.1<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release with basic role-based hiding functionality.<\/li>\n<\/ul>","raw_excerpt":"An enhanced WordPress plugin to hide or show menu items based on user roles and login status.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/171636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=171636"}],"author":[{"embeddable":true,"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mahfuzurwp"}],"wp:attachment":[{"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=171636"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=171636"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=171636"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=171636"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=171636"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/zgh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=171636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}