How do I add related products to a blog post?

Solved

How do I add related products to a blog post?

Teacherjeanell
Tourist
12 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 46

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 46

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
12 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!

admsolindo
Shopify Partner
21 0 4

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. 

Arif_Shopidevs
Shopify Partner
141 18 14

Hello, 
You can find easy display product which help to show product in blog page with nice template and easy for user. https://apps.shopify.com/easydisplay-product-showcase you can try .

Found it helpful? Please like and mark the solution that helped you.
Slider Revolution - Create sliders, theme sections, banners, videos, pages, advanced animation, and social feeds.
Essential Grid Gallery - Create photo galleries, video galleries, portfolio galleries, product gallery, collection gallery and more.
EasyDisplay: Product Showcase - Easily display collections, related products, discounts, recently viewed items, and best sellers