Multiple aggregate ratings

#701209
  • Resolved Emma Hodges
    Rank Math free

    Hi,
    I have this issue that has come up on Google search Console.
    43 products Review has multiple aggregate ratings

    I have used this filter on my website, but i has not worked:

    add_filter( ‘rank_math/snippet/rich_snippet_product_entity’, function( $entity ) { if($entity[‘aggregateRating’]) { unset($entity[‘aggregateRating’]); unset($entity[‘review’]); } return $entity; });

    Please may you advise on what i can do to fix it.

    Thank you.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello,

    We apologize for the inconvenience you’re experiencing with the multiple aggregate ratings issue on Google Search Console. We appreciate you reaching out to us for assistance.

    To address this issue, we recommend using the following code snippet to add the aggregate rating to your product schema:

    add_filter('rank_math/snippet/rich_snippet_product_entity', function ($entity) {
        $score = get_post_meta(get_the_ID(), 'users_rating', true); // Replace with your rating post meta.
        $count = get_post_meta(get_the_ID(), 'users_rating_count', true); // Replace with your rating count post meta.
        $entity['aggregateRating'] = array(
            '@type'       => 'aggregateRating',
            'ratingValue' => $score,
            'ratingCount' => $count,
        );
        return $entity;
    });

    Please ensure that you replace users_rating and users_rating_count with the appropriate post meta fields for your website.

    After adding the code snippet, remember to click the Update File button at the bottom of the screen to reflect the changes.

    If you have any further questions or need additional assistance, please feel free to reach out to our support team, and we’d be happy to help you at any time.

    We hope this information helps you resolve the issue. Thank you for using Rank Math!

    Sources:
    How to Fix Aggregate Rating Error » Rank Math
    Rank Math SEO Filters and Hooks for Developers – Rank Math
    How to Make Your Theme Rank Math Compatible » Rank Math

    Hi, thank you for the reply.
    I am struggling to work out how to “replace users_rating and users_rating_count with the appropriate post meta fields for your website.”
    Please may you help me with this. Thank you so much!

    Hello,

    Thank you for your patience.

    Could you please confirm if you’re using a 3rd party plugin to get the reviews/aggregateRating? If so, please share the name so we can check as well.

    You can upload screenshots using this tool and add the link here.

    Looking forward to helping you.

    Hi, Thank you for your reply.
    I used woo commerce reviews in the past. But migrated everything to Judgeme.
    I do also have a trust pilot account but it is deactivated from the website.
    I asked Judge.me and they says:
    “Concerning the “Replace users_rating and users_rating_count” part, this is not from our app so we are not sure what Rank Math is saying here. We don’t have any variables from our app that are named like that that.”

    Thank you!

    Hello,

    In this case, you may need to disable the “aggregateRating” rich snippet from Rank Math that automatically pulls up from the WooCommerce native system. You can achieve this by inserting a small piece of code:

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    	if($entity['aggregateRating']) {
    		unset($entity['aggregateRating']);
    		unset($entity['review']);
    	}
    	return $entity;
    });

    And here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    After adding that to your website, you will no longer see the aggregateRating from our plugin being generated on the page, but our Product Schema will still be on the page. The rating is already added by the Judge.me plugin so your products are still validated.

    Hope that helps.

    Hi,
    Thank you, but yes i already did this. It did not work.
    Any other ideas?

    Thank you,
    Emma

    Hello,

    In this case we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi thank you very much, I have posted the logins.

    This are the exact errors that corresepond to this from Google Search Console.

    1)
    Product snippets errors:
    https://www.cbdstudios.eu/en/product/cbd-recovery-balm-professional/
    https://www.cbdstudios.eu/product/cbd-baume-pour-muscles-et-articulations-2/

    Either “offers”, “review”, or “aggregateRating” should be specified

    2)
    Review snippets
    https://www.cbdstudios.eu/en/product/cbd-recovery-balm-for-muscles-and-joints/
    Review has multiple aggregate ratings

    3)
    Missing these fields: ‘offers’, ‘review’ & ‘aggregateRating’ on 13 product schemas.

    Thank you for your help!

    Hello,

    1. You haven’t added the price for the affected products. Please add a price to fix the issue:

    2. I checked the product, and there is no issue related to aggregateRatings: https://search.google.com/test/rich-results/result?id=BVL8ty5E3cCT8-Gw00S81Q

    Please validate the fix in your GSC account and wait for Google to crawl the URLs again.

    3. Please share some affected URLs so we can check and assist you further.

    Looking forward to helping you.

    Hi,
    Thank you for you help.
    So with this product, i have not indicated a price as it is not for “general sale,” you have to contact us first for wholesale prices.
    Is there a way to indicate this by code for the purpose of this error?

    Missing these fields: ‘offers’, ‘review’ & ‘aggregateRating’ Is actually on the same product.

    “Product”,”name”:”Professional Massage Recovery Balm with CBD, CBD Studios”,”description”:”Professional Massage Recovery Balm with CBD is made from 100% natural ingredients, a product for therapists and massage professionals.”,”category”:”Recovery Balm Pro”,”mainEntityOfPage”:{“@id”:”https://www.cbdstudios.eu/en/product/cbd-recovery-balm-professional/#webpage”},”@id”:”https://www.cbdstudios.eu/en/product/cbd-recovery-balm-professional/#richSnippet”,”image”:{“@id”:”https://www.cbdstudios.eu/wp-content/uploads/2022/06/Pro-balm.jpg”}}]}

    Thank you.

    Hello,

    You will have to add a price or get user reviews to fix the issue. If that’s not possible, then you should ignore the error, or remove the WooCommerce Product Schema, and use the default Product Schema of our plugin. In that, you can add an author review to fix the issue: https://rankmath.com/kb/product-schema/

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Multiple aggregate ratings’ is closed to new replies.