Show/hide menu items with conditional statements
Author: | Layered (profile at wordpress.org) |
WordPress version required: | |
WordPress version tested: | 6.4.3 |
Plugin version: | 0.18.0 |
Added to WordPress repository: | 10-10-2012 |
Last updated: | 04-03-2024 |
Rating, %: | 84 |
Rated by: | 124 |
Plugin URI: | https://layered.store/plugins/if-menu |
Total downloads: | 914 879 |
Active installs: | 70 000+ |
Click to start download |
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 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
Admin
Editor
Author
etc - Page type
Front page
Single page
Single post
- Is Archive page (year, category, search results, etc)
- Visitor device
Is Mobile
- User state
- Advanced visibility rules – requires More Visibility Rules Add-on
- 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
ANDDevice is mobile
- show if
User is Admin
ANDIs front page
- show if
- Support for adding your custom rules
Screenshots
FAQ
ChangeLog