Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed. We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Hi there!
I feel little stupid because I couldn't find an answer to this question through the search function. Anyway!
How can I retrieve the average star rating of a post?
Thanks!
Hi @mrlopeco,
Please navigate to Dashboard > Comments > Settings > Comment List admin page, make sure the "After Content" checkbox is checked in the "Display Ratings" section. Save, delete all caches and check again.
More info here: https://wpdiscuz.com/docs/wpdiscuz-documentation/settings/comment-list-settings/#display_ratings
Don't forget to press CTRL + F5(twice) in the frontend before checking.
Sorry, let me ask this again.
How can I get the average star rating of a post in a wp query.
there is a custom/meta field that counts the star rating if i am not wrong.
thanks
Thank you for clarifying.
Here is the postmeta key you should use:
wpdiscuz_rating_count
Please note, the Meta Key doesn't return the post average count. The key includes the count of each rating(5/4/3/5...). You should count the average value of each post manually to get the star rating of the post.