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

How to set up product links

The Product link block adds a button on the product page that links to a related product — usually another colour or style that exists as a separate listing. Add one block per linked product to build a row of buttons.

A row of product link buttons on the product page

Step 1 — Create the metafield definition

In Shopify admin, go to Settings → Metafields and metaobjects → Products, click Add definition, and set:

  • Name — Men product

  • Namespace and key — custom.men_product (or any name you prefer)

  • Type — Product, one value

Click Save.

Creating the Linked product metafield definition

Each Product link block shows one button to one product, so create one metafield per link you want in the row. For a men's / women's / kids' set, for example, define custom.men_product, custom.women_product, and custom.kid_product.


Step 2 — Assign the linked product on each product

Open a product, scroll to Metafields → Linked product, and select the related product (for example, another colour of the same style). Save, and repeat for every product in the group.

Assigning the linked product on a product's metafield

In the theme editor, go to the product page → Product Information section → Details block, and add a Product siblings block. Inside it, add one Product link block per link you want, and connect each block's Product field to its metafield: click the Connect dynamic source icon, pick the metafield, and save.

Product link blocks live inside a Product siblings block — they can't be added directly to Details. For a row of buttons, add several Product link blocks, each connected to its own metafield. The button whose linked product matches the product being viewed is highlighted automatically.

Prefer not to use a metafield? In each Product link block, set the Product field to the target product by hand — the rest of the flow is the same.


headset

Need help?

Whether you have a question, run into an issue, or just need some guidance, our support team is here to help.

Chat with us Submit a ticket

Last updated