Render conditional content using Liquid
On this page
Use these Liquid globals to show or hide content based on which store is being viewed, and on who is viewing it.
How to show and hide conditional content on your site
current_store
Display content based on the current store.
```liquid
{% if current_store.code == ‘dog-store’ %} The {{ current_store.name }} is the best for dogs {% elsif current_store.code == ‘cat-store’ %} The {{ current_store.name }} is the best for cats {% endif %} ```
current_customer
Display or hide content based on the customer who is signed in.
```liquid
{% if current_customer %} Hi {{ current_customer.firstname }}! Your email address is {{ current_customer.email }} Your account name is {{ current_customer.account.name }} {% endif %} ```
current_account
Display or hide content for a particular account.
```liquid
{% if current_account %} Hi {{ current_account.firstname }}! Your email address is {{ current_account.email }} Your account name is {{ current_account.account.name }} {% endif %} ```
current_membership
Display content based on the membership level of the person signed in.
```liquid
{% if current_membership %} {% if current_membership.name == ‘VIP’ %} Welcome back! {% endif %} {% endif %} ```
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.