Get the average reviews value for a post with a php function ?
-
Hi,
After looking through the documentation I couldn’t find how to get the average programmatically.
I would like to have a php function like :
get_reviews_average($post->ID);
which would return a float number like “4.5” for example.
The result would be the average score for all the reviews of a particular post.
Additionnaly, it would be awesome to have a similar function but to display the stars only. I know there is a shortcode that does it : do_shortcode( “[site_reviews_summary assigned_to={$post->ID} hide=bars,summary,rating]” ) but I would prefer to have a php function.
Thanks for your help and congrats for the efforts given into this awesome plugin.
- The topic ‘Get the average reviews value for a post with a php function ?’ is closed to new replies.