-
Hey, I have a WooCommerce shop and build my product pages with Elementor and the “Site Reviews” plugin (https://wordpress.org/plugins/site-reviews/)
Both the plugin and RankMaths create 2 product schemas that have different information (https://search.google.com/test/rich-results?utm_campaign=sdtt&utm_medium=message&id=0pmu9boY3AuvSNmtIw1jtA)
I need to group both schemas together to create a clean and complete feed.
Can you help me?
The latest conversations on the subject can be read here:
https://wordpress.org/support/topic/aggregaterating-schema-doesnt-worki/
https://support.rankmath.com/ticket/rankmaths-x-site-reviews-issue/At that time I received the following code from you and the Site Reviews team. But since an update it probably doesn’t work anymore ..
add_filter('rank_math/snippet/rich_snippet_product_entity', function ($entity) { $entity['@id'] = get_permalink().'#product'; return $entity; }); add_filter('woocommerce_product_get_average_rating', function ($rating) { $args = ['assigned_to' => 'post_id']; if (is_admin() && $ratingInfo = apply_filters('glsr_get_rating', null, $args)) { return $ratingInfo->average; } return $rating; });
I think the basic problem is that Site Reviews gives a different ID than RankMaths .. I hope you can help
The ticket ‘2 Product Schema Data with Site Reviews Plugin’ is closed to new replies.