liquid - How Do I Get MetaObject Values On Single MetaObject Page In Shopify
Solution:
After you have created your meta object definition in the Shopify admin you need to then create another definition on your project page with the field type of metaobject I did the following for products to accomplish this :
Created meta-object of benefit and added a single text field.
Created a metafield for product which was called a mixed reference list and referenced the benefits meta object i created.
Added a couple of benefits with the new meta field in the product admin.
Added liquid to display the list of benefits attached to the page :
-
{% for item in product.metafields.custom.benefits.value -%}
- {{ item.benefits }} {%- endfor %}
I hope this helps!
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.