Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
What I am trying to do:
Where I am at:
The following have worked thus far:
{% unless template.suffix == 'opt-in-page' %}
{% section 'announcement' %}
{% section 'header' %}
{% endunless %}
And this works:
{% unless template.suffix == 'opt-in-page' or template.suffix == 'opt-in-page-2' %}
{% section 'announcement' %}
{% section 'header' %}
{% endunless %}
What I tried and did NOT work (assuming that the * is a normal wildcard character):
{% unless template.suffix == 'opt-in-page*' %}
{% section 'announcement' %}
{% section 'header' %}
{% endunless %}
I anticipate dozens of nearly-identical opt-in pages over the coming year and do not want to have to add code to this file every time I make one if they all follow the same naming convention.
Thanks in advance for any suggestions on how to use the wildcard!
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025