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.
In this article:
Product Pages
- 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>
- In your Shopify admin dashboard, click on Online Store > Themes > "..." > Edit code, to open the code of your theme
- 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
- 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>
- Click on "Save"
Featured Product on Home Page
- 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>
- In your Shopify admin dashboard, click on Online Store > Themes > "..." > Edit code, to open the code of your theme
- 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
- 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>
- Click on "Save"
Collection Pages
- 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>
- In your Shopify admin dashboard, click on Online Store > Themes > "..." > Edit code, to open the code of your theme
- 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
- 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>
- Click on "Save"
Updated on: 15/01/2024
Thank you!