Re: How to display specific blog posts on product page if the metafield product list contains it?

How to display specific blog posts on product page if the metafield product list contains it?

webdev100
Excursionist
17 2 4

Hello,

 

I'm using Dawn theme and have a blog called "recipes" and it contains posts of well, recipes. I set up a custom metafield under product list, so each recipe displays the products used within. I want to do this same thing but opposite, where under every product where a recipe(blog post) using that product exists will be shown. I hope to base this section off the "featured blog" section but have it only display the recipes from the blog that include the product. 

 

Maybe something like:

for articles in blog{

     if blog contains this product { display }

}

 

Please help write some code for this and where to add it, thank you!

Replies 2 (2)
webdev100
Excursionist
17 2 4

Can you provide the Liquid code?

webdev100
Excursionist
17 2 4

I have sent a private message!