Hiding certain URL's from not logged-in customers

New Member
4 0 0

Hi there,

Is there a way to hide certain links from certain customers?

For example:

Customer 1 - tagged "yes" in shopify backend, logged in

Customer 2 - tagged "no" in shopify backend, logged in


Customer 1 CAN see the link, Customer 2 cannot see the link.


Is this possible? Any help would be fantastic!

Shopify Staff
Shopify Staff
557 4 88

Hi Cat!

Liam here from Shopify - thank you for your question :)

Great to see you are looking to set up "hidden" sections on your site that only logged in customers can see. You can create this effect using the Locksmith app. When you use this app you can create tags for your customers which will allow them access to areas which regular visitors would not see :)

Hope this helps Cat, if you have any other questions, just let me know!


Shopify Guru

Shopify Partner
112 9 23

This is old, but going to answer it anyway for someone else. It's called control flow tags. For example, customer 1 is wholesale. They need to go to the wholesale collection. Customer 2 needs to go to the retail collection. Different links need to display under different customer conditions. Therefor, you would code: 


{% if customer.tags contains 'wholesale-client' %} <!-- Make sure to tag your wholesale customer -->
<a href="/collections/watches-wholesale">Continue</a> <!-- Show this link to your wholesale customer -->
{% else %}<!-- If customer is not a wholesale customer -->
<a href="/collections/watches">Continue</a> <!-- Show this link to all other customers -->
{% endif %}

If you wanted to show nothing for retail customers for example, you would effectively leave their link blank, like this: 


{% if customer.tags contains 'wholesale-client' %} 
<a href="/collections/wholesale-watches">Continue</a> 
{% else %}
<!-- Nothing goes here -->
{% endif %}
I am a multi-disciplined web developer with years of experience working with several languages and frameworks.
New Member
1 0 0