Skip to content

Instantly share code, notes, and snippets.

@resistorsoftware
Created March 27, 2012 18:44
Show Gist options
  • Save resistorsoftware/2219033 to your computer and use it in GitHub Desktop.
Save resistorsoftware/2219033 to your computer and use it in GitHub Desktop.
How to use Product Metafields
{% assign mf = product.metafields.meta_data %}
{% unless mf == empty %}
{% for mf in product.metafields.meta_data' %}
{% capture key %}{{ mf | first }}{% endcapture %}
{% if key == 'meta_description' %}
<h1>{{mf | last}}</h1>
{% endif %}
{% endfor %}
{% endunless %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment