Need to display a product's average rating and its total number of reviews in a specific location on your store? You can use metafields to access these data and add them to your theme code. 

About metafields provides 2 Shopify standard metafields: reviews.rating (stored as a rating type) and reviews.rating_count (stored as a number_integer type). In particular:

  • {{ }} lets you display the average rating (e.g. "value": "3.5")
  • {{ }} lets you display the number of reviews (e.g. 125)

Besides, you can also access the minimum and maximum value of a product rating via the scale_max and scale_min values.

  • {{ }} lets you display the minimum value of rating ("scale_min": "1.0")
  • {{ }} lets you display the maximum of rating value ("scale_max": "5.0")

How to add metafields in theme code

To add metafields to your theme code, please follow these steps:

  • Go to Shopify Admin > Online Store > Themes.
  • Click on the Actions button in your Current theme and choose Edit Code.
  • Locate the product.liquid file.
  • Add code to display your metafields.
  • Save and go check any product in your store.

If you have any concerns, contact us at and we'll help you.

Examples of metafields on live store metafields will return the numbers only. You can add any text next to them to annotate your information. For example: 

Here is how the metafields are displayed on your live store: