How do I display shopify metafield on my Avenue Theme?

How do I display shopify metafield on my Avenue Theme? I created a metafield via the Shopify admin, but I do not see the option to add dynamic source to the text fields under the Product template in the theme editor.

Hi @sunchard ,

If you want to add options in Customize, your theme must be OS 2.0 so you need to check your theme’s version again.

Or you can add it directly in the code, go to product-template.liquid file and add code, ex:

Code: {{ product.metafields.my_fields.subtitle }}

You just need to add the code according to Shopify’s instructions, it will display fine.

Hope it helps!

Hi @sunchard ,

Displaying metafields on the product page might be slightly different depending on what theme is used in your Shopify store, but in most cases putting a proper Liquid code snippet into the product page template file as suggested by @LitExtension does the trick.

Here’s the link to a great step-by-step tutorial on how to display a metafield on the product page. It works for both OS 2.0 and legacy themes.