Add related products to your blog posts using Metafields in Shopify.

Stephen Keable
3 min readOct 18, 2022

Like my article about linking products to other products using metafields in Shopify, this short article shows that we can use a similar approach to link to products from a blog post too.

We can make use of the same product reference metafields definition, this time against the blog posts instead of products.

Creating the definition

Head to the Settings -> Metafields section of your store admin. Here we can select the “Blog posts” part of the store to add a field to.

Then we can add a new definition.

Here we use the name “Related Products” and key “custom.related_products” which will work in the liquid snippet below.

Select the “Product reference” content type. Followed by the “List of products” if you want to be able to link multiple products from your blog post.

--

--

Stephen Keable

Shopify partner, JavaScript/Liquid/Swift developer, convert to serverless architecture and builder of digital products people love to use since 1999.