All things Shopify and commerce
Hi all, Our customers are tagged as either Consumer or Trade and I need to show a different menu for each tag. I have created 2 menus in the Shopify navigation dashboard, but am struggling to find a way of implementing this in the code. We are using the Stiletto them from Fluorescent.
Thanks in advance for any help 🙂
Hi,
It's great that you've already set up the two different menus in the Shopify navigation dashboard. Here is how to display different menus based on customer tags:
1. Ensure you have two distinct menu templates ready for Consumer and Trade customers.
2. To implement conditional menu display, you'll need to edit your theme's template files. Specifically, you'll be working with the header.liquid file (or the relevant file for your theme).
It is an example of the code you can add:
liquid
{% if customer.tags contains 'Consumer' %}
{% include 'menu-consumer' %}
{% elsif customer.tags contains 'Trade' %}
{% include 'menu-trade' %}
{% else %}
{% include 'default-menu' %}
{% endif %}
This code checks the customer's tags and includes the appropriate menu based on the tag.
3. Create two separate menus menu-consumer and menu-trade. Set these menus up as needed. These menus will be included in the template depending on the customer's tag.
Hope this helps!
Thank you, I will give that a go 🙂
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025