Review AggregateRating Issue

#997223
  • Muza
    Rank Math free

    Good morning, the Rank Math Seo plugin conflicts with the service we use for reviews (Feedaty). With Rank Math Seo active, Feedaty is blocked from creating the aggregateRating in the product sheet.

    So we created this snippet to add it to the head.

    The problem is that this way there are two Product Schemas and it is not good. We should find a way to inject the aggregateRating of Feedaty into the Product Schema generated by Rank Math Seo.

    Can you help us?

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing with the Rank Math SEO plugin conflicting with your review service, Feedaty. It sounds like you’re encountering a situation where two Product Schemas are being generated, which can indeed cause problems.

    To resolve this, you can use a filter to modify the existing Product Schema generated by Rank Math and inject the aggregateRating from Feedaty. Here’s a code snippet that you can use to achieve this:

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

    Make sure to replace feedaty_rating and feedaty_rating_count with the actual meta keys used by Feedaty to store the rating and count values.

    This way, you will be modifying the existing Product Schema instead of creating a new one, which should help eliminate the conflict.

    If you need further assistance or if this does not resolve the issue, please reply to this ticket, and a human agent from the Rank Math Support team will take over and assist you further.

    Thank you for raising this concern!

    Sources:
    How to Fix Aggregate Rating Error » Rank Math

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this ticket.