Show specific content for non-logged users

Solved
CharruaDevelop
Tourist
15 0 1

Hi friends!
I need to know how to write the liquid code that allows me to show specific content only to non-logged users.

If you can help me I thank you!
Greetings from Uruguay

0 Likes
Anthony_David_
Trailblazer
229 29 87

This is an accepted solution.

Hello @CharruaDevelop ,

Use the below code, it will only show if user is not logged in.

{% unless customer %}
  I will only be visible to non-logged users.
{% endunless %}

 

Thanks

Shopify Expert - Theme customization | Design | Marketing | Product Sales
Hire Me: anthonyuidesigner@gmail.com
Whatsapp ( Click on number )- +33 6 28 93 62 05
Guleria
Shopify Partner
1781 375 530

This is an accepted solution.

Hello,

{% if customer %}
  This customer is logged in.
{% else %}
  This customer is not logged in.
{% endif %}

 

Thanks

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
Buy me a coffee ☕ My PayPal
CharruaDevelop
Tourist
15 0 1

Perfect!

Very tks!!

0 Likes
CharruaDevelop
Tourist
15 0 1

Very tks!

0 Likes