Title: If Menu &#8211; Visibility control for Menus
Author: Andrei
Published: <strong>10. Oktober 2012</strong>
Last modified: 5. Dezember 2024

---

Plugins durchsuchen

![](https://ps.w.org/if-menu/assets/banner-772x250.png?rev=1862232)

![](https://ps.w.org/if-menu/assets/icon-256x256.png?rev=1862232)

# If Menu – Visibility control for Menus

 Von [Andrei](https://profiles.wordpress.org/andreiigna/)

[Herunterladen](https://downloads.wordpress.org/plugin/if-menu.0.19.2.zip)

 * [Details](https://de.wordpress.org/plugins/if-menu/#description)
 * [Rezensionen](https://de.wordpress.org/plugins/if-menu/#reviews)
 * [Entwicklung](https://de.wordpress.org/plugins/if-menu/#developers)

 [Support](https://wordpress.org/support/plugin/if-menu/)

## Beschreibung

Control what menu items your site’s visitors see, with visibility rules. Here are
a few examples:

 * Display a menu item only if `User is logged in`
 * Hide menus if `Device is mobile`
 * Display menus only for `Admins and Editors`
 * Hide Login or Register links for `Logged in Users`
 * Display menus for `Users from US or UK`
 * Display menus only for `Customers with active membership`
 * Display menus for visitors browsing with `Language English or Spanish`

After the plugin is enabled, each menu item will have a new option “Change menu 
item visibility” which will enable the selection of visibility rules.

Check the examples in screenshots or try it here  [demos.layered.store](https://demos.layered.store)

### Features

 * Basic set of visibility rules
    - User state `User is logged in`
    - User roles `Admin` `Editor` `Author` etc
    - Page type `Front page` `Single page` `Single post`
    - Is Archive page (year, category, search results, etc)
    - Visitor device `Is Mobile`
 * Advanced visibility rules – requires [More Visibility Rules Add-on](https://layered.store/plugins/more-visibility-rules)
    - Visitor location – detect visitor’s Country
    - Visitor language – detect visitor’s selected Language
    - WooCommerce Subscriptions – Display menus for users with active subscription
    - WooCommerce Memberships – Display menus for customers with active membership
      plans
    - Groups – Detect if users are in specific groups
    - WishList Member – Detect the users‘ membership level
    - Restrict Content Pro – Detect the users‘ subscription level
 * Multiple rules – mix multiple rules for a menu item visibility
    - show if `User is logged in` AND `Device is mobile`
    - show if `User is Admin` AND `Is front page`
 * Support for [adding your custom rules](https://wordpress.org/plugins/if-menu/#how%20can%20i%20add%20a%20custom%20visibility%20rule%20for%20menu%20items%3F)

## Screenshots

 * [[
 * If Menu website demo
 * [[
 * Enable visibility rules for Menu Items
 * [[
 * Example of visibility rules

## FAQ

### Show or hide menus if user is logged in

One of the most popular uses of the plugin is to show the „Register/Login“ menu 
for non-logged-in users, and „Your account“ for logged-in users.

To enable this for „Register/Login“ menu, follow these steps:
 1. Go to WordPress
Admin on your website -> Appearance -> Menus 2. Expand the menu item for „Register“
or „Login“ page 3. Enable the option „Enable visibility rules“ 4. Choose the rule„
Hide if user logged in“

For showing the „Your account page“, follow these steps:
 1. Go to WordPress Admin
on your website -> Appearance -> Menus 2. Expand the menu item for „Your account
page“ page 3. Enable the option „Enable visibility rules“ 4. Choose the rule „Show
if user logged in“

### Mix multiple visibility rules

Multiple visibility rules can be used at once, like so:

For showing a menu item only for admins on desktop:
 1. Go to WordPress Admin on
your website -> Appearance -> Menus 2. Expand the menu item you want 3. Enable the
option „Enable visibility rules“ 4. Choose the rule „Show if user is Administrator“
5. Click the „+“ button at the end of the visibility rule, and change to „AND“ 6.
On the newly added row, choose „Hide if device is mobile“

For showing a menu item for Admins or users with an active subscription:
 1. Go 
to WordPress Admin on your website -> Appearance -> Menus 2. Expand the menu item
you want 3. Enable the option „Enable visibility rules“ 4. Choose the rule „Show
if user is Administrator“ 5. Click the „+“ button at the end of the visibility rule,
and change to „OR“ 6. On the newly added row, choose „Show if Has active subscription
__“

To remove an extra visibility rule:
 1. Go to WordPress Admin on your website ->
Appearance -> Menus 2. Expand the menu item with multiple visibility rules 3. Click
on the „AND“ / „OR“ buttons at end of visibility option 4. Change to „+“

### If Menu is broken, no visibility rules are available

There’s a known limitation with adding functionality for menu items in WordPress,
and conflicts may happen between some plugins and themes.

If there are multiple plugins that extend Menu Items, for example If Menu and a 
plugin for Menu Icons, only one of them can add the needed functionality and the
other one won’t work as expected.

This is an ongoing [issue with WordPress](https://core.trac.wordpress.org/ticket/18584)
which hopefully will be fixed in a future release.

If the „Menus“ page is blank or options for visibility rules are not displaying,
there is a way to test which plugin/theme causes this conflict.
 Please disable 
other plugins or themes until you find the one that causes the problem, and contact
the respective developers. In the message include the link to WordPress ticket about
menu items https://core.trac.wordpress.org/ticket/18584 where they can see detailed
info on how to fix the problem.

### Changes to menus are not saved

This problem may happen on sites with a large number of menu items.
 In most cases,
this is not a limitation or problem caused by plugins or WordPress, but by the hosting
server.

Your hosting provider or server limits the amount of data that can be sent to WordPress
for saving in database.
 The setting is named „PHP max_input_vars“ and it’s value
should be increased, ex: `max_input_vars = 200` to `max_input_vars = 500`. Contact
your hosting provider or make the change yourself if you have access. More details
can be found here https://core.trac.wordpress.org/ticket/14134

### 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](https://developer.wordpress.org/themes/references/list-of-conditional-tags/)
which can be used to create custom rules for almost any combination that a theme/
plugin developer can think of.

## Rezensionen

![](https://secure.gravatar.com/avatar/f70b0c412048fc67603673f9a1d10f0b2cc70f573d03c0edb1c09e355f2c4f95?
s=60&d=retro&r=g)

### 󠀁[Still works, but not healthy](https://wordpress.org/support/topic/still-works-but-not-healthy/)󠁿

 [lowercase99](https://profiles.wordpress.org/lowercase99/) 11. Februar 2026

I have been using If Menu for some time and it is perfect for limiting and/or permitting,
access depending on any combination of subscription, Role or logged In/logged Out
HOWEVER although it is still functioning, access to „Appearance > Menu“ is very 
slow and the connection will most often timeout. This means you cannot update the
configuration. If Menu has not been updated for some time and it may no longer be
compatible with recent versions of WordPress (I am running v6.9) This is unfortunate
as I cannot find another solution that offers the same functionality UPDATE – I 
have switched to „User Menus – Nav Menu Visibility“ by By Code Atlantic and although
it seems to be of the same vintage as IF Menu (has not been updated in over a year)
it appears to be fully functional and has almost the same functionality as IF Menu

![](https://secure.gravatar.com/avatar/a338ab0aeb8357715fe8f70335d08221aec2b980dd8cd914b8b9b4a78b8f1a8c?
s=60&d=retro&r=g)

### 󠀁[It used to be great, it stopped working](https://wordpress.org/support/topic/it-used-to-be-great-it-stopped-working/)󠁿

 [romano117](https://profiles.wordpress.org/romano117/) 8. Januar 2026 1 Antwort

Sad day, this plugin doesn’t work anymore

![](https://secure.gravatar.com/avatar/d4250c3a5c2a5ac69e24d333860c95ea2679cb0e6bb20911f6746b51c892eb61?
s=60&d=retro&r=g)

### 󠀁[No funciona](https://wordpress.org/support/topic/no-funciona-140/)󠁿

 [José Luis Hernández](https://profiles.wordpress.org/jllifecoach/) 14. August 2025

No funciona, no deja acceder al menu, hace que se caiga el servidor

![](https://secure.gravatar.com/avatar/e2466a8229751bf0a2a125e39a59716114dea0c9e330ed0caf7485267119fad4?
s=60&d=retro&r=g)

### 󠀁[Disable „enable in admin panel“ when using WPML Menu Sync](https://wordpress.org/support/topic/disable-enable-in-admin-panel-when-using-wpml-menu-sync/)󠁿

 [t0b1hh](https://profiles.wordpress.org/t0b1hh/) 21. April 2025

On /wp-admin/themes.php?page=if-menu uncheck „Enabled in Admin panel“. Otherwise
WPML’s menu sync won’t work properly and for example „hide when logged in“ menu 
items won’t sync

![](https://secure.gravatar.com/avatar/c2bd54d43656ebff0eaf690242bd97150259fd24e3f3ccd8e62f5a2b811815b3?
s=60&d=retro&r=g)

### 󠀁[Worked well for my basic need](https://wordpress.org/support/topic/worked-well-for-my-basic-need/)󠁿

 [lausianne](https://profiles.wordpress.org/lausianne/) 9. April 2025

All I needed was to hide menu items from visitors. Probably overkill, but it worked
well and easy for that.

![](https://secure.gravatar.com/avatar/097e1aa913af125ee71c6145431ce773f44170781aaeb42676e60421ae51ccc4?
s=60&d=retro&r=g)

### 󠀁[Fails since WP 6.4.5 – developer closed?](https://wordpress.org/support/topic/fails-since-wp-6-4-5-developer-closed/)󠁿

 [revcoincidence](https://profiles.wordpress.org/revcoincidence/) 16. August 2024

I loved this. It was exactly what I wanted. Sadly, it hasn’t been updated to be 
compatible with recent updates to WP and nobody from the development team appears
ever to respond to the free support forum. The Plugin’s own website appears to be
inaccessible (so I can’t contact them), suggesting to me that this is not going 
to be updated. I’d be happy to be corrected, but the plugin’s failures to hide certain
menu options on my sites mean I am now having to completely re-think how to approach
this. My advice would be not to install (free or pro).

 [ Alle 130 Rezensionen lesen ](https://wordpress.org/support/plugin/if-menu/reviews/)

## Mitwirkende und Entwickler

„If Menu – Visibility control for Menus“ ist Open-Source-Software. Folgende Menschen
haben an diesem Plugin mitgewirkt:

Mitwirkende

 *   [ Andrei ](https://profiles.wordpress.org/andreiigna/)
 *   [ atanasprchev ](https://profiles.wordpress.org/atanasprchev/)

„If Menu – Visibility control for Menus“ wurde in 5 Sprachen übersetzt. Danke an
[die Übersetzer](https://translate.wordpress.org/projects/wp-plugins/if-menu/contributors)
für ihre Mitwirkung.

[Übersetze „If Menu – Visibility control for Menus“ in deine Sprache.](https://translate.wordpress.org/projects/wp-plugins/if-menu)

### Interessiert an der Entwicklung?

[Durchstöbere den Code](https://plugins.trac.wordpress.org/browser/if-menu/), sieh
dir das [SVN-Repository](https://plugins.svn.wordpress.org/if-menu/) an oder abonniere
das [Entwicklungsprotokoll](https://plugins.trac.wordpress.org/log/if-menu/) per
[RSS](https://plugins.trac.wordpress.org/log/if-menu/?limit=100&mode=stop_on_copy&format=rss).

## Änderungsprotokoll

#### 0.19.2 – 5 Dec 2024

 * Updated – Improved WordPress v6.7 compatibility

#### 0.19.0 – 4 Mar 2024

 * Updated – Improved WordPress v6.6 compatibility
 * Fixed – Integration with Restrict Content Pro plugin

#### 0.18.0 – 4 Mar 2024

 * Updated – WordPress v6.4 compatibility
 * Updated – Improved check for IP geolocation

#### 0.17.0 – 26 Mar 2023

 * Fixed – Broken Access Control
 * Fixed – Check if callbacks are valid for Conditions

#### 0.16.3 – 26 June 2022

 * Added – More usage examples in plugin FAQs section
 * Updated – WordPress v6 compatibility
 * Updated – Integration with Restrict Content Pro plugin is improved

#### 0.16.2 – 17 January 2020

 * Fixed – Error shown about the registered REST Api endpoint
 * Updated – Ensure compatibility with WordPress 5.6

#### 0.16.1 – 11 April 2020

 * Fixed – Improved compatibility with other plugins that extend menu items

#### 0.16 – 1 April 2020

 * Added – Visibility rule – Is Archive page
 * Updated – Ensure compatibility with WordPress 5.4
 * Updated – Improved compatibility with WooCommerce Membership/Subscription plugins

## Meta

 *  Version **0.19.2**
 *  Zuletzt aktualisiert **vor 1 Jahr**
 *  Aktive Installationen **50.000+**
 *  Getestet bis **6.7.5**
 *  PHP-Version ** 6.0 oder höher **
 *  Sprachen
 * [Dutch](https://nl.wordpress.org/plugins/if-menu/), [English (US)](https://wordpress.org/plugins/if-menu/),
   [French (France)](https://fr.wordpress.org/plugins/if-menu/), [Russian](https://ru.wordpress.org/plugins/if-menu/),
   [Spanish (Spain)](https://es.wordpress.org/plugins/if-menu/) und [Ukrainian](https://uk.wordpress.org/plugins/if-menu/).
 *  [Übersetze in deine Sprache](https://translate.wordpress.org/projects/wp-plugins/if-menu)
 * Schlagwörter
 * [hide](https://de.wordpress.org/plugins/tags/hide/)[menu](https://de.wordpress.org/plugins/tags/menu/)
   [roles](https://de.wordpress.org/plugins/tags/roles/)[rules](https://de.wordpress.org/plugins/tags/rules/)
   [visibility](https://de.wordpress.org/plugins/tags/visibility/)
 *  [Erweiterte Ansicht](https://de.wordpress.org/plugins/if-menu/advanced/)

## Bewertungen

 4.1 von 5 Sternen.

 *  [  91 5-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/if-menu/reviews/?filter=5)
 *  [  8 4-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/if-menu/reviews/?filter=4)
 *  [  7 3-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/if-menu/reviews/?filter=3)
 *  [  3 2-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/if-menu/reviews/?filter=2)
 *  [  21 1-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/if-menu/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/if-menu/reviews/#new-post)

[Alle Rezensionen anzeigen](https://wordpress.org/support/plugin/if-menu/reviews/)

## Mitwirkende

 *   [ Andrei ](https://profiles.wordpress.org/andreiigna/)
 *   [ atanasprchev ](https://profiles.wordpress.org/atanasprchev/)

## Support

Möchtest du etwas mitteilen? Brauchst du Unterstützung?

 [Support-Forum anzeigen](https://wordpress.org/support/plugin/if-menu/)