AI Assistant
Notifications
Clear all

[Solved] Top Rated Comments - Comment Rating

3 Posts
2 Users
2 Reactions
1,402 Views
Posts: 2
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@brendan-shanahan)
Member
Joined: 2 years ago
[#13777]

I am setting up a new site that is using comment ratings as I need multiple ratings per article (e.g. Quality, Performance, Overall etc), however the Top Rated Comments tab in the widget is blank, I assume this is because it only works on article ratings?

 

Is there a way to display the top-rated posts, by a designated comment rating meta key?


2 Replies
Astghik
Posts: 6645
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@astgh)
Illustrious Member
Joined: 8 years ago

Hi Brendan Shanahan,

 Top Rated Comments tab in the widget is blank, I assume this is because it only works on article ratings?

Yes, this works only on article ratings. 

Is there a way to display the top-rated posts, by a designated comment rating meta key?

I've already asked the developers to check if it's possible to make these changes in the addon core.


Posts: 2
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@brendan-shanahan)
Member
Joined: 2 years ago

FYI I was able to achieve this by using the 'wpdiscuz_after_comment_post' hook to populate a custom meta field with my combined average rating, # of rating votes, and most recent comment date/time.  This allows me to use a query loop (Generate Blocks) in my sidebar with a query that is ordered by any of these meta fields, so I can create my own 'Top Rated', 'Most Recent', 'Most Active' etc.

The combined average rating of multiple rating blocks is discussed here - https://wordpress.org/support/topic/wpdisuz-calculate-total-comment-rating/#post-18014164

 


Share:
Scroll to top