Notifications
Clear all

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.

 

Get posts average star rating

4 Posts
2 Users
0 Reactions
1,752 Views
(@mrlopeco)
New Member
Joined: 6 years ago
Posts: 2
Topic starter  

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!


   
Quote
Topic Tags
Elvina
(@elvina)
Support
Joined: 6 years ago
Posts: 1403
 

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.


   
ReplyQuote
(@mrlopeco)
New Member
Joined: 6 years ago
Posts: 2
Topic starter  

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


   
ReplyQuote
Elvina
(@elvina)
Support
Joined: 6 years ago
Posts: 1403
 

@mrlopeco,

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.


   
ReplyQuote
Share:
Scroll to top