Using this plugin you can use WordPress Conditional Tags to enable or disable menu items on the front-end. It works like ‘Widget Logic’ but for menu items.
You must insert conditional tags in the “Visibility” box in the menu item options form. You can use any PHP or WordPress functions to build crazy conditions and logics for menu items. For example, to hide the menu item on homepage you can set the visibility to:
To hide the menu item to logged in users:
To show the menu item only to users with “administrator” role:
- Upload the
menu-item-visibilitydirectory to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Locate the ‘Menus’ item on the ‘Appearance’ menu
- While editing your menu item, you see another option: Visibility, input your logic and that’s it.
Does not work for me (config WP7 and enfold theme). No form displayed on the menu page… nothing happens, nor in other places…
Despite various 1 star reviews this plugin seems to work just fine.
thank you for this mod
Hi on latest version of wordpress 4.6.1 and can’t see the visibility field in menu item?
This is a very useful plugin, and it works exactly as advertised. Well done!
Contributors & Developers
“Menu Item Visibility Control” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Possible fatal error prevention
- Fix compatibility with Menu Icons plugin
- Fix menu item edit screen styles
- Fix Customizer wiping out the Visibility value upon save
- Got rid of PHP notices in the admin area
- Updated Walker_Nav_Menu_Edit
- Gantry 4.0 compatibility
- implemented singleton pattern
- added the remove_visibility_meta function which cleans up the meta datas for deleted menu items
- Fixed a minor bug where unnecessary database rows in postmeta table would be created upon save
- fixed a bug concerning using quotes in conditions
- Compatibility with latest WordPress release
- Fixed a minor bug where conditions would also execute on the admin area