Variant not showing up in Collection

I have a PDP that has 3 size variants. I want 1 of the size variants to present on a collections page so I added a custom variant metafield for collections and selected the collection I want it to present in. Did not work. What am I doing wrong? I’m ok with all variants showing once the user clicks through to PDP, but I want it to present with the variant I added the metafield to as the hero image on the collections page and preselected when the user clicks through to PDP.

Hi @tmtech

You’re on the right track conceptually, but Shopify’s collection pages only list products, not individual variants — so even if you add a metafield to a variant, Shopify doesn’t treat it as an independently listable item in collections.

Here’s how to achieve your goal:

  • Create a product metafield (e.g. custom.featured_variant) with the variant ID you want to feature.

  • In your collection grid, update the image and link:

{% assign featured_variant = product.metafields.custom.featured_variant %}
{% assign variant_obj = product.variants | where: "id", featured_variant | first %}

  {{ variant_obj.image | image_url: '500x' | image_tag }}

  • On the PDP, Shopify will auto-select the variant via the ?variant=ID in URL.