We have moved to a new and improved knowledge base. This article is no longer updated. Please click here to find the new version

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

About Judge.me metafields

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

  • {{ product.metafields.reviews.rating.value }} lets you display the average rating (e.g. "value": "3.5")
  • {{ product.metafields.reviews.rating_count }} 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.

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

How to add Judge.me metafields in theme code

To add Judge.me 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 support@judge.me and we'll help you.

Examples of Judge.me metafields on live store

Judge.me 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: