Using Metafields App

   
  1. Install App
  2. Add field values
Select the product that should have a Metafield and click + Add New Metafield. Add The Following:
  • Namespace - I usually use the name of the store. Don't use spaces.
  • Key - Unique name. Don't use spaces.
  • Value - The content that will show up on the website.
Screenshot 2016-04-05 11.55.01 Code for showing contents of Metafield on the Collection page.
<!-- laced is the namespace, while composer is the key -->



Use this for the product-loop.liquid - within the collection page. 

<!-- product-loop.metafields.namespace['key'] -->
{% assign composer = product-loop.metafields.laced['composer'] %}
{% unless composer == blank %}
    <div class="composer">
      {{ composer }} 
    </div>   
{% endunless %}
  Code for showing contents of Metafield on the Product page.
<h2 class="composer"> {{ product.metafields.laced.composer }} </h2>
   

Leave a comment