Articles on: Getting Started 🔥

Displaying the rating on old themes

Wide Hello!


Here is how to show the rating if you're using an old theme by adding code.


If you're using a new Shopify theme 2.0, you can click here to learn how to display the different WideReview widgets.



In this article:

  1. Product pages
  2. Featured product on home page
  3. Collection pages



Product Pages


  1. In order to add the stars to product pages you have to copy the following code:


<div data-widereview-rate="{{ product.metafields.widereview.rating }}"
data-widereview-amount="{{ product.metafields.widereview.amount }}"
class="widereview-rate"
data-widereview-rate>
</div>


  1. In your Shopify admin dashboard, click on Online Store > Themes > "..." > Edit code, to open the code of your theme



  1. Open the file you use for product pages in the folders Templates or Sections.


The files are usually called: product.liquid, product-template.liquid, product-page.liquid, product-main.liquid



  1. Paste the code where you want the stars to appear.


Usually you want to paste it below the title so look for the product title (you can search for "title"). It should be a tag <h1> or <h2> or even <h3>



  1. Click on "Save"





  1. In order to add the stars to the featured product on the home page you have to copy the following code:


<div data-widereview-rate="{{ product.metafields.widereview.rating }}"
data-widereview-amount="{{ product.metafields.widereview.amount }}"
class="widereview-rate"
data-widereview-rate>
</div>


  1. In your Shopify admin dashboard, click on Online Store > Themes > "..." > Edit code, to open the code of your theme



  1. Open the file you use for featured products in the folders Templates or Sections.


The files are usually called: featured-product.liquid, homepage-product.liquid



  1. Paste the code where you want to show the stars


Usually you want to paste it below the title so look for the product title (you can search for "title"). It should be a tag <h1> or <h2> or even <h3>



  1. Click on "Save"




Collection Pages


  1. In order to add the stars to the collections you have to copy the following code:


<div data-widereview-rate="{{ product.metafields.widereview.rating }}"
data-widereview-amount="{{ product.metafields.widereview.amount }}"
class="widereview-rate"
data-widereview-rate>
</div>


  1. In your Shopify admin dashboard, click on Online Store > Themes > "..." > Edit code, to open the code of your theme



  1. Open the file you use for collections. Usually in the folder Snippets


The files are usually called: product-card-grid.liquid, product-grid-item.liquid, product-info.liquid, card-product.liquid



  1. Paste the code where you want to show the stars


Usually you want to paste it below the title so look for the product title (you can search for "product.title"). It should be a tag <h1> or <h2> or even <h3>



  1. Click on "Save"



If you need help you can contact our support by chat directly in WideReview's app dashboard.

Updated on: 15/01/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!