How to display products assigned to a meta object in the Studio theme

How to display products assigned to a meta object in the Studio theme

Gallery6
Visitor
3 0 0

Hi folks!

 

We are an art gallery that wants to achieve the following:

1. Display artist bio's on their product page (example page)

2. Display artist products on their bio page (example page)

2. Display a list of artists on a dedicated page 

 

Artists are currently saved as a meta object in our Shopify but it seems achieving the points above requires some custom coding. I want to avoid having to create separate collection pages for each artist, since that would be twice the work.

 

Any help achieving this in the studio theme would be appreciated!

Replies 2 (2)

Shadab_dev
Shopify Partner
1316 66 148

Hey @Gallery6 this guy's explanation of metaobjects is pretty neat. Also the example he used is very much similar to what your requirement is. I am sure this will help in some way whatsoever.

 

https://youtu.be/QodbszNa7cI?si=TkOMWzK7418j43T6

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.

Carlos-Sz
Excursionist
97 6 32

Hello @Gallery6,

What you're aiming to do is definitely achievable without creating separate collection pages for each artist, but it will require a bit of custom coding using Shopify’s Liquid and the metaobject (or metafield) system.

 

For example, you can store your artist information—bios, images, links, etc.—as a metaobject. Then on your product pages, you can pull in the corresponding artist’s bio by referencing the artist metaobject that’s linked to each product. This way, when a customer views a product, they’ll also see the artist’s bio dynamically pulled from the metaobject.

 

Similarly, for an artist bio page, you can create a template that loads the artist’s metaobject data and then uses it to filter and display products. By doing so, you avoid having to create individual collection pages because you can build a dynamic query that lists all products associated with that artist. Finally, on a dedicated artists index page, you can loop through all your artist metaobjects to display a list of artists.

 

It does involve some custom Liquid coding, but it’s a much cleaner approach than manually setting up separate collections. There are plenty of Shopify developer docs on metaobjects and Liquid filtering that can help guide you through the process.