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?
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
replied to wrong comment
{% assign page_ids = ‘ID1,ID2,ID3’ | split: ‘,’ %}
{% if page_ids contains page.id %}
.css { }
{% else %}
.css { }
{% endif %}