How can I hide a menu tab from untagged customers?

Solved

How can I hide a menu tab from untagged customers?

Isabel2648
Shopify Partner
17 0 3

Is there a way to edit the main menu template so that only one of the tabs is hidden from untagged customers?

 

What ever user will see.

Isabel2648_1-1637086222046.png

 

What only customer.tags  users will see.

Isabel2648_0-1637086175085.png

 

Accepted Solution (1)

KetanKumar
Shopify Partner
37143 3648 12062

This is an accepted solution.

@Isabel2648 

yes you can do this something live this 

{% if customer.tags contains 'wholesale' %}
  {% assign current_linklist = 'wholesale' %}
{% else %}
  {% assign current_linklist = 'main-menu' %}
{% endif %}

{% for link in linklists[current_linklist].links %}
  // code to output your linklist
{% endfor %}
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

View solution in original post

Replies 6 (6)

KetanKumar
Shopify Partner
37143 3648 12062

This is an accepted solution.

@Isabel2648 

yes you can do this something live this 

{% if customer.tags contains 'wholesale' %}
  {% assign current_linklist = 'wholesale' %}
{% else %}
  {% assign current_linklist = 'main-menu' %}
{% endif %}

{% for link in linklists[current_linklist].links %}
  // code to output your linklist
{% endfor %}
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
GlenMaxilux
Excursionist
12 0 7

hi @KetanKumar where do i add this code if using Dawn theme 2.0? it is exactly what i need i assume it goes in the header.liquid??

KetanKumar
Shopify Partner
37143 3648 12062

@GlenMaxilux 

header  menu code

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
GlenMaxilux
Excursionist
12 0 7

@KetanKumar Thank you for this got it to work

KetanKumar
Shopify Partner
37143 3648 12062

@GlenMaxilux 

its my pleasure to help us 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
TWCIndia
Tourist
14 0 3

Hi

I have a similar requirement. I want to hide one of the menu items from the main menu for non-logged in customers. Is there a way to do this? 

 

The item I want to hide is Collections list