Get rating-data only
-
Hello! First of all, thank you for your plugin, I use it on each my WP-site.
I want to request additional function to get only rating-data of post. I need this to build my own microdata markup or show only rating without ability to rate post. Let me show my cases:
1) I have a post-page with two blocks for rate this post. I also need microdata for Aggregate rating for this page. But if I check standart “Google snippet” feature in plugin options – I’ll see 2 agrragateRating-tags for my both rating blocks. It’s quite incorrect for microdata.
2) I have category-page, where I want only show stars for each post without ability to rate it . AggragateRating also appears here for each post, it’s incorrect too.All I need is something like this:
$rating = get_the_rating(); print $rating['avg_score']; print $rating['users_count']; print $rating['max_rate'];
Thank you!
- The topic ‘Get rating-data only’ is closed to new replies.