For the complete documentation index, see llms.txt. This page is also available as Markdown.

Linked Products

Set up linked products for related variants or products.

Linked Products let you connect separate products and display them as color swatches on the product page. This is useful when you want to:

  • Show each color as a separate product on Collection pages

  • Display only the images of the selected color in the product gallery


Step 1 — Create the metafield

  1. Go to Shopify Admin → Settings → Metafields and metaobjects → Products

  2. Click Add definition

  3. Fill in the fields exactly as shown:

    • Name: Linked products

    • Namespace and key: custom.linked_products

    • Type: Product — List of products

  4. Save


  1. Go to Shopify Admin → Products → [your product]

  2. Scroll down to Product metafields

  3. Find Linked products and select all the products in the same color group

  4. Include the current product itself — this makes it appear first and look selected when a customer views that product

  5. Save

Swatch order

Order is set by drag-and-drop directly inside the metafield on the product page — not in the Variants section. The order must be set manually in each product of the group. If you skip this, swatches will appear in a different order on different product pages.


Step 3 — Add the block in Theme Editor

  1. Go to Theme Editor → Products → Default product template

  2. Inside the Product overview section click Add block → Linked products

  3. Save


Step 4 — Adjust the design

  1. In Theme Editor go to Theme settings → Variant selector

  2. Scroll down to Linked products

  3. Adjust Image ratio, Focal point, Corner radius and Shadow to match your store design


Optional: Use color swatches instead of product images

By default, each swatch shows the first image of the linked product. You can replace it with a solid color or a custom image (useful for textures like wood grain, marble, etc.).

Option A — Solid color swatch

  1. Go to Shopify Admin → Settings → Metafields and metaobjects → Products

  2. Click Add definition and create a new metafield:

    • Name: Linked color

    • Namespace and key: custom.linked_color

    • Type: Color

  3. Save

  4. Open each product, scroll to Metafields, and pick the color

The theme will automatically replace the product image with this color in the Linked Products block.

Option B — Custom image swatch

  1. Create a metafield with these settings:

    • Name: Linked image

    • Namespace and key: custom.linked_image

    • Type: File

  2. Upload a small square image (PNG, ~100×100px) for each product



Common issues

Swatches are not showing on the product page

Check that:

  • The Linked products block is added inside the Product overview section in Theme Editor

  • The metafield custom.linked_products is filled in on the product you're viewing — including the product itself

  • Every product in the group has the metafield filled in (not just one of them)

Swatches appear in the wrong order

The order follows the sequence of products in the metafield. Go to Shopify Admin → Products → [your product] → Metafields → Linked products and drag the items into the desired order.

Remember to update the order on every product in the group — each product has its own independent list.

I see product photos instead of colors

Create the custom.linked_color metafield (see "Optional: Use color swatches instead of product images" above) and assign a color to each product. Without this metafield, the theme defaults to showing the first product image.


octagon-exclamation

Last updated

Was this helpful?