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.