Matt Member
6 months ago

Is there code to detect admin/staff acounts for dev work?

I would love to have something like this logic so I could work on design/dev stuff and not show the world but i don't see any way to detect the user accounts. It can be done for a 'customer' but not an admin:

{% if current_user == me %}
show some stuff for me only
{% endif %}

I could do something like detect the current user (me) and get the user id of some kind then create an expression to show a block only when user id == my id. Anyone think of a waay to do this?

Shopify, if you are listening, there needs to be thought put towards creating some dev environments into the product so we don't have to do everything "live". Is there a way to show content only to our staff account?

6 months ago

When you log in shopify you want it to show "Matt" or "Dealer" in a colored block of some sort?

6 months ago


there is a tool for this -- you mark a product as Unavailable for Online store -- this will effectively hide the product on your website. To see how the product page looks you should use the view icon at the top of product properties page in Admin.

However, there are ways to do what you want:

https://freakdesign.com.au/blogs/news/34154561-detect-if-shopify-admin-is-logged-in-using-liquid and a more extended approach:



Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
connorv Member
3 months ago

One of the biggest advantages to Shopify is the dev environment that already exists. You should always be working in a preview of a duplicated theme - once you're happy with the changes then publish the theme. What do you think that's there for..?