Menu Item Visibility Control

Description

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.

Usage

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:
! is_home()

To hide the menu item to logged in users:
! is_user_logged_in()

To show the menu item only to users with “administrator” role:
in_array(‘administrator’, $GLOBALS[‘current_user’]->roles)

Screenshots

  • Visibility Control

Installation

  1. Upload the menu-item-visibility directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Locate the ‘Menus’ item on the ‘Appearance’ menu
  4. While editing your menu item, you see another option: Visibility, input your logic and that’s it.

FAQ

I don’t see the Nav Menu Roles options in the admin menu items?

Please see this page: https://wordpress.org/plugins/nav-menu-roles/faq/

Reviews

does not work for me

Does not work for me (config WP7 and enfold theme). No form displayed on the menu page… nothing happens, nor in other places…

Read all 53 reviews

Contributors & Developers

“Menu Item Visibility Control” is open source software. The following people have contributed to this plugin.

Contributors

“Menu Item Visibility Control” has been translated into 26 locales. Thank you to the translators for their contributions.

Translate “Menu Item Visibility Control” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.3.5

  • Possible fatal error prevention

0.3.4

  • Fix compatibility with Menu Icons plugin

0.3.3

  • Fix menu item edit screen styles

0.3.2

  • Fix Customizer wiping out the Visibility value upon save

0.3.1

  • Got rid of PHP notices in the admin area
  • Updated Walker_Nav_Menu_Edit

0.3

  • Gantry 4.0 compatibility
  • implemented singleton pattern
  • added the remove_visibility_meta function which cleans up the meta datas for deleted menu items

0.2.1

  • Fixed a minor bug where unnecessary database rows in postmeta table would be created upon save
  • fixed a bug concerning using quotes in conditions

0.2

  • Compatibility with latest WordPress release
  • Fixed a minor bug where conditions would also execute on the admin area