Embed the Code

During the installation, the app has automatically generated two snippets for your main theme:
  • rw-js.liquid: The core JavaScript snippet that enables Rating-Widget to load and operate all of the widgets in the page.
  • rw-rating.liquid: The rating element snippet.
  • rw-ratings-data.liquid: The ratings vote data - for ratings Rich Snippets. This file is only relevant for Professional and Business users.
  • rw-settings.liquid: Your custom ratings settings which you'll be able to modify from the customization section in the app.
You must include the snippets into your store's main theme in order to start seeing the ratings.

How to add ratings to your Product pages?

Simply include the snippets by using the Template Editor as following:
  1. Go to your Store Admin Dashboard.
  2. There, click the Online Store menu, then Themes. At the right side, click on the button with three dots, and select Edit HTML/CSS. Shopify template editor selection
  3. Open Layouts/theme.liquid, scroll down to the bottom of the template and add {% include 'rw-js' %} immediately before the </body> tag:
    Shopify theme layout template
  4. Open Templates/product.liquid (for blog posts, please see the next step) and search for product.title. If you can't find it, open Sections/product-template.liquid instead, and search there. Then, add {% include 'rw-rating' %} right after the title HTML element (*):
    Shopify theme product template
    (*) Actually you can add the rating snippet wherever you like the rating to be placed in the template. We just recommend to add it right after the title so your customers will immediately see the rating of the product.

How to add ratings to your Blog posts?

  1. Open Templates/article.liquid and search for article.title. If you can't find it, open Sections/article-template.liquid and search there. Then, add {% include 'rw-rating' %} right after the title HTML element or below its enclosing HTML element (*):
    Shopify theme product template
    (*) Like in product.liquid, you can actually add the rating snippet wherever you like the rating to be placed in the template. We just recommend to add it below the title or the title's enclosing element so your customers will immediately see the rating.

Congrats! Your store is now spiced up with beautiful star ratings. Go to your store's products collection page and open any of the products to see the ratings. You should also open any of your blog posts and check the rating.

Can't see the ratings? go to our FAQ.