Show menus on selected pages or to selected customers
Show or hide a whole menu by page, by B2B customers, or by customer tags.
Use Display conditions to decide where a whole menu appears and who sees it. For example, show a menu only on collection pages, hide it on the cart page, show a wholesale menu only to B2B customers, or show a VIP menu only to customers with a VIP tag. The setting needs Growth Navigation or Pro Navigation. On Basic Navigation, the group is greyed out and has a link to the Growth plan.
Set display conditions
-
Open the Advanced tab
In the editor, click the Advanced icon (
</>) (1) in the left bar, then open the Display conditions group. It reads All visitors until you set a condition.(1) Advanced tab, (2) Pages, (3) B2B customers, (4) Customer tags -
Choose the pages
Under Pages (2), click Only on to show the menu only on the pages you choose, or Hide on to hide it there. Then tick page types, add specific URLs, or both (see Pages).
-
Choose B2B customers (optional)
Under B2B customers (3), click Only B2B or Hide for B2B.
-
Choose customer tags (optional)
Under Customer tags (4), click Only tags or Hide for tags, then type each tag in Tags and press Enter.
-
Save and publish
Click Save, then Publish.
The group’s one-line summary shows the conditions that are on, for example Only on selected pages · Only selected tags.
Conditions
Pages
- All pages
- The menu shows on every page. This is the default.
- Only on
- The menu shows only on the ticked page types and the URLs you add.
- Hide on
- The menu shows everywhere except on the ticked page types and the URLs you add.
Page types are Home page, Collection, All collections, Product, Page, Blog, Blog post, Search, Cart and Customer account.
Specific URLs adds single pages. Paste a link or type a path such as /collections/sale, then press Enter. Each URL becomes a chip; click its × to remove it.
- End a path with
*to include every page under it:/blogs/news*matches the blog and all its posts./blogs/news/*matches only the posts. - Paste several links at once, separated by spaces, commas or new lines.
- A full link (
https://your-store.com/collections/sale) is saved as its path. Upper case, query strings (?…) and#…are ignored. - Paths work in every language:
/collections/salealso matches/fr/collections/sale.
If a value isn’t a valid path, the field shows Not a valid path, skipped: and the value isn’t added.
B2B customers
- Everyone
- The menu shows to every visitor. This is the default.
- Only B2B
- The menu shows only to customers who log in as part of a B2B company. Guests and other customers don’t see it.
- Hide for B2B
- B2B customers don’t see the menu. Everyone else does.
Customer tags
- Everyone
- The menu shows to every visitor. This is the default.
- Only tags
- The menu shows only to logged-in customers who have at least one of the tags. Guests don’t see it.
- Hide for tags
- Customers who have any of the tags don’t see the menu. Everyone else does, including guests.
Type each tag exactly as it appears on the customer in Shopify (Customers > a customer > Tags), then press Enter or type a comma.
How it works
- The menu shows only when every condition passes. For example, Only on Collection together with Only B2B shows the menu to B2B customers on collection pages only.
- Within Pages, a page counts as selected when it matches a ticked page type or one of the URLs.
- The conditions are checked before the page loads, so a hidden menu never flashes on screen.
- When the menu is hidden, another published menu that matches the visitor shows instead. If there isn’t one, your theme’s own menu stays.
- Display conditions work together with Market availability and the schedule: the menu must pass all of them.
- To hide a single item rather than the whole menu, use the item’s Visibility settings.
Show a different menu to some customers
-
Create the second menu
In Menu manager, Duplicate your main menu and edit the copy, for example with wholesale collections.
-
Set opposite conditions
In the copy, set B2B customers to Only B2B. In the original menu, set it to Hide for B2B. Use Only tags and Hide for tags with the same tags the same way.
-
Publish both menus
Click Save, then Publish on each one. Showing several live menus at once needs Pro Navigation (see Multiple menus).
Troubleshooting
The menu doesn't show anywhere
With Only on, tick at least one page type or add a URL. With Only B2B or Only tags, log in as a matching customer to see the menu: guests never match.
A URL doesn't match
Check the path in your browser’s address bar after the store domain. To include every page under a path, end it with *.
A tag doesn't match
Tags must match exactly, including upper and lower case. Check the spelling on the customer in Shopify.
How do I test the conditions?
Open your storefront in a private window, as a guest. Then log in with a test customer that has the tag, or that belongs to a B2B company, and check the menu again.
Was this helpful?
Thanks for your feedback! Tell us what was missing
Report an issue