Title: Schema issue (glsr average and glsr count)
Last modified: May 28, 2020

---

# Schema issue (glsr average and glsr count)

 *  Resolved [BB1975](https://wordpress.org/support/users/bb1975/)
 * (@bb1975)
 * [6 years ago](https://wordpress.org/support/topic/schema-issue-glsr-average-and-glsr-count/)
 * Hi Paul,
 * First of all, thanks for this awesome plugin…
 * I’m having a schema issue that I was hoping you could help me with. I’m using
   the Schema Pro plugin (wpschema.com) to handle the schema for my website and 
   I’m mapping the review rating and review count to glsr average and glsr count.
   However, it doesn’t appear that Site Reviews is working properly as I’m getting
   an aggregate rating error when I check the pages in Google’s structured data 
   tool:
 * “One of ratingCount or reviewCount must be provided.”
 * Any ideas?
 * Thanks in advance, Paul. I really appreciate you!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [6 years ago](https://wordpress.org/support/topic/schema-issue-glsr-average-and-glsr-count/#post-12906600)
 * What is the URL?
 *  Thread Starter [BB1975](https://wordpress.org/support/users/bb1975/)
 * (@bb1975)
 * [6 years ago](https://wordpress.org/support/topic/schema-issue-glsr-average-and-glsr-count/#post-12907282)
 * Hi Paul, thank you for your quick reply. How can I send it to you privately?
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [6 years ago](https://wordpress.org/support/topic/schema-issue-glsr-average-and-glsr-count/#post-12907464)
 * Follow the instructions on the “Contact Support” section on the Help page.
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [6 years ago](https://wordpress.org/support/topic/schema-issue-glsr-average-and-glsr-count/#post-12940280)
 * The problem was due to incorrect usage of the `_glsr_count` meta_key which contrary
   to how the meta_key sounds, does not store the number value of the total assigned
   reviews but rather a rating array of the assigned reviews.
 * To solve this, you will need to contact the Schema Pro developer to see if they
   provide a filter hook where you can use the provided `glsr_get_rating` function
   to get the rating counts. For example:
 *     ```
       $ratingInfo = apply_filters('glsr_get_rating', null, [
           'assigned_to' => 'post_id',
       ]);
       $ratingCount = !empty($ratingInfo) ? $ratingInfo->reviews : 0;
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Schema issue (glsr average and glsr count)’ is closed to new replies.

 * ![](https://ps.w.org/site-reviews/assets/icon-256x256.gif?rev=3307009)
 * [Site Reviews](https://wordpress.org/plugins/site-reviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/site-reviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/site-reviews/)
 * [Active Topics](https://wordpress.org/support/plugin/site-reviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/site-reviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/site-reviews/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/schema-issue-glsr-average-and-glsr-count/#post-12940280)
 * Status: resolved