Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have have metaobjects that references a list of products.
For example:
I have created a "Artist" metaobject
This metaobject has some fields such as name, location and releases.
Releases is a list of references to products "Releases" for that specific artist.
In the admin for example i can see a list of all the products being referenced for that artist, but i havent been able to find a way to do the same on my template. where i want to list all the releases that artist has when user goes to the Artist metaobject page.
See screenshot of how it looks in the admin:
Hello,
I have the same question.
Can't find an answer on the documentation.
Same here. Can't access these references.
The only way we could accomplish this is to create a category with all the products for that metaobject and then assign it to the metaobject itself. But this way we are having more work.
But personally I don't think it makes sense. There should be a way to access the products referenced by a metaobject
Yeah, how is this not an option? Literally the reason the references are there.
This is possible.
Here is some code to get you started. It will pull in a list of products and the URL, featured image, title, and description for each of them. Then you can use CSS to customize the appearance or figure out how to pull in different data fields from the products and reorder them.
{% paginate collections["all"].products by 3000 %}
{% for product in collections.all.products %}
{% if product.metafields.custom.METAFIELD_NAME_HERE.value.title == metaobject.title %}
<a href="{{product.url}}">
<div class="repeater-card">
<img src="{{product.featured_image | image_url }}" width="200px" height="200px">
<h4>{{ product.title }}</h4>
<p>{{ product.description }}</p>
</div>
</a>
{% endif %}
{% endfor %}
{% endpaginate %}
This needs to be pulled up to @Shopify that the admin can list all references of a metaobject, but we cannot easily reference this list in the frontend. Having to use hacks like mentioned to manually loop through ALL items to find reference to it.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025