If Menu


Display tailored menu items to each visitor, based on visibility rules. Here are a few examples:

  • Muestra un elemento de menú solo si el usuario está conectado
  • Hide menu items if Device is mobile
  • Muestra elementos de menú solo para Admins y editores
  • Hide Login or Register links for Logged in Users
  • Display menu items for Users from US and UK

El plugin es fácil de usar, cada elemento de menú tiene una opción “Cambiar visibilidad del elemento del menú” que permitirá la selección de reglas (ejemplo en las capturas de pantalla)


  • Conjunto básico de reglas de visibilidad
    • Estado del usuario El usuario está conectado
    • Perfiles de usuario Admin Editor Autor etc
    • Tipo de página Portada Página Entrada
    • Visitor device Is Mobile
  • Advanced visibility rules – requires Premium plan
    • Visitor location – detect visitor’s Country
    • 3rd-party plugin integrations – WooCommerce Subscriptions, Groups, WishList Member
  • Varias reglas – mezcla varias reglas de visibilidad en un elemento de menú
    • mostrar si el usuario está conectado Y el dispositivo es móvil
    • mostrar si el usuario es Admin Y está en portada
  • Te permite añadir tus propias reglas personalizadas

Un ejemplo de añadir una nueva regla de visibilidad se describe en la sección de preguntas frecuentes


  • Permite reglas de visibilidad en los elementos de los menús
  • Ejemplo de reglas de visibilidad


To install the plugin, follow the steps below

  1. Upload if-menu to the /wp-content/plugins/ directory
  2. Activa el plugin a través del menú ‘Plugins’ en WordPress
  3. Activa las reglas de visibilidad de tus elementos de menú en la página Apariencia -> Menús

Preguntas frecuentes

Instrucciones de instalación

To install the plugin, follow the steps below

  1. Upload if-menu to the /wp-content/plugins/ directory
  2. Activa el plugin a través del menú ‘Plugins’ en WordPress
  3. Activa las reglas de visibilidad de tus elementos de menú en la página Apariencia -> Menús
If Menu is broken, no visibility rules are available

The code for modifying the menu items is limited and if other plugins/themes try to alter the menu items, this plugin will break.

This is an ongoing issue with WordPress which hopefully will be fixed in a future release.

Try to use just one plugin that changes functionality for menu items.

How can I add a custom visibility rule for menu items?

New rules can be added by any other plugin or theme.

Example of adding a new custom rule for displaying/hiding a menu item when current page is a custom-post-type.

// theme's functions.php or plugin file
add_filter('if_menu_conditions', 'my_new_menu_conditions');

function my_new_menu_conditions($conditions) {
  $conditions[] = array(
    'id'        =>  'single-my-custom-post-type',                       // unique ID for the rule
    'name'      =>  __('Single my-custom-post-type', 'i18n-domain'),    // name of the rule
    'condition' =>  function($item) {                                   // callback - must return Boolean
      return is_singular('my-custom-post-type');

  return $conditions;
Where can I find conditional functions?

WordPress provides a lot of functions which can be used to create custom rules for almost any combination that a theme/plugin developer can think of.

Who made that really cool icon

Got the icons from here https://dribbble.com/shots/1045549-Light-Switches-PSD, so giving the credit to Louie Mantia


Great Job !

Well done, bro ! I’ve been using it many times 🙂

But sadly, it doesn’t work whith Divi Theme : when activate, all the main pages appears, even those which are not in menu, appears in my primary menu…

Simple yet soooo powerful

Who needs a bloated membership plugin. All you need is this as long as the menu is the only navigation you have. I had to restrict access to some pages too and used Page Restrict plugin but this is great for me with different levels of membership – my committee have their ownmenu options, me as admin my own too.


Works great with Membership plugin

A client is using Justin Tadlock’s Membership plugin and wants to hide pages on the navigation menu for the general public, but show them for logged in users (members). Found this plugin and it’s just what the doctor ordered. VERY simple to install and configure individual menu items from the standard WP Menus interface.

Good Job!!

Leer todas las 69 reseñas

Colaboradores y desarrolladores

“If Menu” es un software de código abierto. Las siguientes personas han colaborado con este plugin.


“If Menu” ha sido traducido a 2 idiomas. Gracias a los traductores por sus colaboraciones.

Traduce “If Menu” a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN , o suscríbete al log de desarrollo por RSS .

Registro de cambios


Release Date – 20 February 2018

  • Fixed – Support for older visibilty rule names, fixes PHP warning


Release Date – 20 February 2018

  • Fixed – Better options checking, fixes PHP warning


Release Date – 19 February 2018

  • Added – Visibility rules with multiple options. Requires Premium plan
  • Added – Visibility rule – User country
  • Added – Visibility rule – Is Super Admin on MultiSite
  • Added – Visibility rule – User is in Group, integration with Groups plugin
  • Added – Visibility rule – User has subscription, integration with WooCommerce Subscriptions plugin
  • Added – Visibility rule – User membership level, integration with WishList Member plugin
  • Updated – Better conflict detection for Nav_Menu Walker
  • Fixed – translation strings & function used


Release Date – 18 September 2017

  • Enhancement – Nicer styling for visibility rules
  • Added – Peek option – Let admins preview hidden menu items
  • Added – Settings page


Release Date – 17 August 2017

  • New visibility rule – Language Is RTL
  • Fix – Single rule works on servers with Eval disabled


Release Date – 8 August 2017

  • Fix – Backwards compatibility with PHP < 5.4


Release Date – 7 August 2017

  • Improvement – Change labels & texts for easier use
  • Improvement – Better compatibility with latest versions of WordPress
  • Improvement – Better compatibility with translation plugins
  • Fix – Detection for conflict with other plugins


Release Date – 27 August 2016

  • Improvement – Dynamic conditions based on default & custom user roles (added by plugins or themes) thanks Daniele
  • Improvement – Grouped conditions by User, Page or other types
  • Fix – Filter menu items in admin section
  • Fix – Better menu items filter saving code


Release Date – 20 August 2016

  • Improvement – Support for WordPress 4.6
  • Feature – New condition checking logged in user for current site in Multi Site [requested here](https://wordpress.org/support/topic/multi-site-user-is-logged-in-conditi
  • Feature – Added support for multi conditions thanks for this ideea
  • Improvement – RO & DE translations


Release Date – 13 December 2015

  • Fix – Fixes issue with adding new menu items


Release Date – 29 November 2015


Small update

  • Plugin icon
  • Set as compatible with WordPress 4


Minor fixes

  • Fix – Editing menus – show/hide conditions when adding new item (thanks Joseph Segal)


Update for compatibility with newer versions of WordPress

  • Feature – access to menu item object in condition callback (thanks BramNL)
  • Fix – alert for leaving page even if no changes were made for menus (thanks Denny)
  • Fix – update method in Walker_Nav_Menu_Edit to be compatible with newer version of WP
  • Fix – example in Readme (thanks BramNL)


  • Plugin release. Included basic menu conditional statements