What's your biggest current challenge? Have your say in Community Polls along the right column.

Linking Metaobject taxonomy categories to a liquid code

Linking Metaobject taxonomy categories to a liquid code

Jessi44
Shopify Partner
5 0 1

Can we link the automatic "Category Metafields" that shows up under a product listing to a liquid code? It shows up between the variant and metafield option when you add a product page: 

 Screenshot 2024-07-08 at 6.58.30 PM.png
here is is under the metafield product option and also the content > metaobject area:
Screenshot 2024-07-08 at 6.54.56 PM.pngScreenshot 2024-07-08 at 6.56.08 PM.png

I want to be able to use it in a liquid code so it will show an icon if its been selected. For example, if the product category metafield "dietary-preference" is "vegan" in its list then show the "vegan" SVG icon. 

if {{ shop.metaobjects['shopify--dietary-preferences']['vegan'] }} is selected then show icon.

Is this possible?


Reply 1 (1)

joshuaboileau
Shopify Partner
5 0 0

I'm looking for this as well. Currently Dietary Preferences and Product Certifications & Standards have a note when you hover over the image area in the metaobject section that says, "No compatible thumbnail field on this entry." 

If I can easily link a thumbnail that would be a great solution.