Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
This feature is hardcoded to the UI but you can workaround this by adding the following code to your theme’s functions.php file:
add_filter('rank_math/snippet/rich_snippet_service_entity', function( $entity ) {
$entity['aggregateRating']['ratingValue'] = '4.9';
return $entity;
});
Looking forward to helping you. Thank you.
And if need a rating from 4 to 5, then in such a way to register code?
add_filter('rank_math/snippet/rich_snippet_service_entity', function( $entity ) {
$entity['aggregateRating']['ratingValue'] = '4.1';
$entity['aggregateRating']['ratingValue'] = '4.2';
$entity['aggregateRating']['ratingValue'] = '4.3';
$entity['aggregateRating']['ratingValue'] = '4.4';
$entity['aggregateRating']['ratingValue'] = '4.5';
$entity['aggregateRating']['ratingValue'] = '4.6';
$entity['aggregateRating']['ratingValue'] = '4.7';
$entity['aggregateRating']['ratingValue'] = '4.8';
$entity['aggregateRating']['ratingValue'] = '4.9';
return $entity;
});
Hello,
We already gave you the code for that.
Moreover, 4.1 etc. ratings are mostly where there are multiple ratings. With Rank Math, only one person is going to leave a rating. So, it could be 4 out of 5 or 5 out of 5.
We do not have an aggregate rating system (except in WooCommerce where that is done automatically) so it doesn’t make sense to allow fractional rating.
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Added code in functions.php. I tried to edit the old page and create a new page. But it does not work. The rating also remained 4 or 5.
https://www.dropbox.com/s/yekidus1iq096i3/nw.jpg?dl=0
-
This reply was modified 5 years, 8 months ago by Alter Ego.
Hello,
Thank you for contacting Rank Math today.
Would you mind sharing some temporary admin access on the sensitive data section along with a link to the affected page so that we can check this for you?
Looking forward to helping you. Thank you.
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.