Solved

How do I add related products to a blog post?

Teacherjeanell
Tourist
11 0 5

I found the info below on an older post. I added the the metafield, but I don't know where to add the custom liquid code. Where do I put the code? I'm using the Impulse theme. Thanks

 

https://stephenkeable.medium.com/add-related-products-to-your-blog-posts-using-metafields-in-shopify...

 

Accepted Solution (1)

kgbfashionista
Navigator
345 24 44

This is an accepted solution.

Hi,

 

Go to Online Store -> Themes -> Edit Code, find the article-template.liquid

 

Then, scroll down till you see this:

 

   <div class="article__body rte">
      {{ article.content }}
    </div>

 

And right after it you should insert your code.

 

At least, that would be most popular placement. Feel free to experiment.

Feel free to like my post if it was helpful at all

View solution in original post

Replies 7 (7)

kgbfashionista
Navigator
345 24 44

This is an accepted solution.

Hi,

 

Go to Online Store -> Themes -> Edit Code, find the article-template.liquid

 

Then, scroll down till you see this:

 

   <div class="article__body rte">
      {{ article.content }}
    </div>

 

And right after it you should insert your code.

 

At least, that would be most popular placement. Feel free to experiment.

Feel free to like my post if it was helpful at all
Teacherjeanell
Tourist
11 0 5

It worked! Thank you

luxbags
Tourist
7 0 2

Hi, I couldn't find article-template.liquid  in dawn 13 version. Could you please tell me where I should paste the code in dawn 13? Much appreciated!

marylabs
Shopify Partner
24 0 3

In case someone is looking for a way to add related products to a blog post without coding, there's this guide where you just need to start typing a product name in a corresponding field, and then choose a product from the options. The related products field is directly integrated into the blog post editing page. 

 

https://magefan.com/shopify/apps/blog/related-products

admsolindo
Shopify Partner
11 0 0

hi, is that code didn't work right now? i tried to place it under that code but it didn't show me the related product.

LIYAShop
Excursionist
30 2 2

I've used the same code and it works like a charm. I just can't figure out how to style the products section so that the products appear as cards, just like everywhere else in Dawn theme.

luxbags
Tourist
7 0 2

I have the same question. I figured out where to put the code and it works perfectly. But making it format like cards will be amazing.