Àpèjúwe
Control what menu items your siteÌtumọ̀ Yorùbá: ’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
Features
- Basic set of visibility rules
- User state
User is logged in - User roles
AdminEditorAuthoretc - Page type
Front pageSingle pageSingle post - Is Archive page (year, category, search results, etc)
- Visitor device
Is Mobile
- User state
- Advanced visibility rules Ìtumọ̀ Yorùbá: – requires More Visibility Rules Add-on
- Visitor location Ìtumọ̀ Yorùbá: – detect visitorÌtumọ̀ Yorùbá: ’s Country
- Visitor language Ìtumọ̀ Yorùbá: – detect visitorÌtumọ̀ Yorùbá: ’s selected Language
- WooCommerce Subscriptions Ìtumọ̀ Yorùbá: – Display menus for users with active subscription
- WooCommerce Memberships Ìtumọ̀ Yorùbá: – Display menus for customers with active membership plans
- Groups Ìtumọ̀ Yorùbá: – Detect if users are in specific groups
- WishList Member Ìtumọ̀ Yorùbá: – Detect the users’ membership level
- Restrict Content Pro Ìtumọ̀ Yorùbá: – Detect the users’ subscription level
- Multiple rules Ìtumọ̀ Yorùbá: – mix multiple rules for a menu item visibility
- show if
User is logged inANDDevice is mobile - show if
User is AdminANDIs front page
- show if
- Support for adding your custom rules
Àwọn àwòrán ìbòjú



FAQ
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 “+”
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Ìtumọ̀ Yorùbá: ’t work as expected.
This is an ongoing issue with WordPress 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.
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Ìtumọ̀ Yorùbá: ’s value should be increased, ex:
max_input_vars = 200tomax_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/14134New 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.
Àwọn àgbéyẹ̀wò
Àwọn Olùkópa & Olùgbéejáde
“If Menu Ìtumọ̀ Yorùbá: – Visibility control for Menus” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.
Àwọn OlùkópaA ti túmọ̀ “If Menu Ìtumọ̀ Yorùbá: – Visibility control for Menus” sí àwọn èdè agbègbè 5. Ọpẹ́lọpẹ́ fún àwọn atúmọ̀ èdè fún àwọn ìkópa wọn.
Túmọ̀ “If Menu Ìtumọ̀ Yorùbá: – Visibility control for Menus” sí èdè rẹ.
Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?
Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.
Àkọsílẹ̀ àwọn àyípadà
0.19.2 Ìtumọ̀ Yorùbá: – 5 Dec 2024
- Updated Ìtumọ̀ Yorùbá: – Improved WordPress v6.7 compatibility
0.19.0 Ìtumọ̀ Yorùbá: – 4 Mar 2024
- Updated Ìtumọ̀ Yorùbá: – Improved WordPress v6.6 compatibility
- Fixed Ìtumọ̀ Yorùbá: – Integration with Restrict Content Pro plugin
0.18.0 Ìtumọ̀ Yorùbá: – 4 Mar 2024
- Updated Ìtumọ̀ Yorùbá: – WordPress v6.4 compatibility
- Updated Ìtumọ̀ Yorùbá: – Improved check for IP geolocation
0.17.0 Ìtumọ̀ Yorùbá: – 26 Mar 2023
- Fixed Ìtumọ̀ Yorùbá: – Broken Access Control
- Fixed Ìtumọ̀ Yorùbá: – Check if callbacks are valid for Conditions
0.16.3 Ìtumọ̀ Yorùbá: – 26 June 2022
- Added Ìtumọ̀ Yorùbá: – More usage examples in plugin FAQs section
- Updated Ìtumọ̀ Yorùbá: – WordPress v6 compatibility
- Updated Ìtumọ̀ Yorùbá: – Integration with Restrict Content Pro plugin is improved
0.16.2 Ìtumọ̀ Yorùbá: – 17 January 2020
- Fixed Ìtumọ̀ Yorùbá: – Error shown about the registered REST Api endpoint
- Updated Ìtumọ̀ Yorùbá: – Ensure compatibility with WordPress 5.6
0.16.1 Ìtumọ̀ Yorùbá: – 11 April 2020
- Fixed Ìtumọ̀ Yorùbá: – Improved compatibility with other plugins that extend menu items
0.16 Ìtumọ̀ Yorùbá: – 1 April 2020
- Added Ìtumọ̀ Yorùbá: – Visibility rule Ìtumọ̀ Yorùbá: – Is Archive page
- Updated Ìtumọ̀ Yorùbá: – Ensure compatibility with WordPress 5.4
- Updated Ìtumọ̀ Yorùbá: – Improved compatibility with WooCommerce Membership/Subscription plugins
