Liquid, JavaScript, themes, sales channels
Can anyone help me with this? I want to create an if-else state for page ID just like this one below -
{% if page.id == XXXXX %}
CSS HERE
{%else%}
CSS HERE
{% endif %}
But there are multiple page IDs for the first condition, how should I do it?
you can try
{% if page.id == XXXXX or page.id == XXXXY or page.id == XXXXZ %}
CSS HERE
{%else%}
CSS HERE
{% endif %}
Hope my solution works perfectly for you.
Cheers!
Oliver | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Make your Instagram Feed a Sales Generator with VIBE Shoppable Instagram Feed.
replied to wrong comment
{% assign page_ids = 'ID1,ID2,ID3' | split: ',' %}
{% if page_ids contains page.id %}
.css { }
{% else %}
.css { }
{% endif %}
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023