Add Schema Aggregate Ratings using WPSSO

There are several ways to add aggregate ratings — as I’ll explain below — but first, before we dive into the “How”, let’s talk about what an “aggregate rating” actually is. ;-) The website defines the Schema aggregateRating property value as:

The overall rating, based on a collection of reviews or ratings, of the item.

Two things to keep in mind about this:

  1. An aggregate rating value is calculated from several customer ratings / reviews for the current webpage content (an e-commerce product review, for example).
  2. Google prefers — and often double-checks — that Schema markup reflects the current content of the webpage. So, if you want to manually set aggregate rating and/or review values in your Schema markup, make sure that these customer ratings and/or reviews also appear in your webpage content (ie. the ratings and reviews are visible).

And two options to add Aggregate Rating markup:

  1. Use a dedicated / single-purpose aggregate rating and/or review plugin, or copy-paste custom markup in your template(s).

    The downside to this option is that all your other content (images, videos, publisher, author, product details, etc.) is not included in this single-purpose / custom markup.

  2. Use a complete and full-featured meta tag and Schema plugin, like WPSSO Core and its WPSSO Schema JSON-LD Markup add-on.

    There are a lot of upsides to this, but one downside is that you may have to tell WPSSO (or any similar full-featured plugin) about any unknown / unsupported rating and review values provided by other plugins. Luckily, WPSSO Core and its WPSSO JSON add-on offer a few ways to do this. ;-)

So what’s the best and easiest way?

  1. The very best (and easiest) way is to use a WPSSO Core supported plugin that offers rating and review features, like the WPSSO Ratings and Reviews add-on. The WPSSO RAR add-on extends the WordPress comment system with optional rating and review features, and does not conflict with WooCommerce’s own product rating features. ;-)

    Note that if you’re using the WPSSO Core Pro plugin, ratings and reviews from WooCommerce, Yotpo Social Reviews for WooCommerce, and WP-PostRatings are also supported.

  2. Alternatively, if you’re using a non-supported plugin — that saves aggregate rating values in post meta — you can use a WPSSO Core custom filter to add Aggregate Rating markup.

    Note that if you’re using the WPSSO JSON Pro add-on, you can also hook the Schema aggregateRating property directly. Either filter will work fine — it just depends on your personal preference. ;-)

  3. If none of the above solutions work for you, the WPSSO Schema JSON-LD Markup add-on also offers a shortcode that you can use to customize the current webpage Schema properties. The schema shortcode documentation includes a practical example on how to add custom aggregate rating values to your content.