Conditions

Contains Operator

Checks whether a string or array includes a value.

Copy or embed this snippet

{% if product.tags contains 'featured' %}
  <span class="badge">Featured</span>
{% endif %}

{% if cart.attributes['gift'] == 'yes' %}
  <!-- gift wrap UI -->
{% endif %}

Embed this snippet on your blog or docs — attribution link appreciated: HTMLToLiquid Converter · Convert to Shopify section →

Generate Shopify sections

Free AI-powered converter — OS 2.0 compatible output with schema validation.

Start converting HTML