Adding the Snippets Widget via code

Showcase impactful glimpses of your best reviews on any of your store's pages using the Snippets Widget. This article explains how to add the widget to any location on your store where you're not able to add the Loox app block.  

Note: If you are using a Shopify 2.0 Theme, click here to learn how to display Loox Widgets on your store pages using the Loox app block- no code necessary.

When to add the Snippets Widget via code vs. via app block

You might need to add the widget via code if:

1. you're on a vintage (1.0) Shopify theme.

2. you're on a 2.0 theme but want to add the widget in a location where you can't use the Loox app block. For example- if you want to add the widget to a custom snippet or using a page-building app like PageFly, GemPages, or Replo.

How to add the Snippets Widget via code

  • Inside the Shopify Themes menu, click the “... ” button next to “Customize” and select "Edit code":
  • Open the relevant page template or section. For example - product page: product.liquid / product-template.liquid / product-page.liquid / propduct-main.liquid. You can also add the Snippets Widget to other pages, such as your homepage or collections pages.
  • Copy the line of code below and paste it where you would like the widget to appear:
  • <loox-snippets-widget product-id="{{ product.id }}"></loox-snippets-widget>

  • Click “Save”:

Related Articles

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article