Ad

Shopify Get Published Or Unpublished State From Liquid

- 1 answer

Is there a method in Liquid that can tell me if a theme is the store's live theme or if it's unpublished?

I am wondering is something like {{ theme.role }} is possible (I know that this particular one was deprecated) and then I would get published or unpublished in return.

Ad

Answer

{{ theme.role }} - it's available for now, but not documented as far as I see. It returns:

  • main - for published theme
  • unpublished
Ad
source: stackoverflow.com
Ad