Include recommendations in blog posts

Blog Recommendations

Do you write blog posts for your Shopify store? If you use the built-in blog engine it's really easy to include related product recommendations in your posts. So if you're writing about a product, you might want to show related products that the reader might also be interested in at the end of your post. Here's how.

  • Write your blog post as usual.

  • Go to the 'Show HTML' button at the top right of the content-editing box (it looks like this: <>)

Click on 'Show HTML'

  • Enter this code, substituting your store's URL and the product code for the item you're writing about
<section class="betterrecs" data-shop="" data-product_id="your product ID" data-template="product" data-purpose="product" style="overflow: auto; clear: both;"></section>

It will look something like this: HTML code looks like this

  • When you publish the blog you'll see the related products included, something like this

Blog post with product recommendations

If you want to show the items that the user has recently viewed, simply omit the data product ID and use 'recent' as the template and purpose, like this:

<section class="betterrecs" data-shop="" data-template="recent" data-purpose="recent" style="overflow: auto; clear: both;"></section>
Find us on Shopify