Notifications
Clear all

[Solved] wpDiscuz stars rate

3 Posts
2 Users
0 Reactions
1,457 Views
(@rascasse)
New Member
Joined: 6 years ago
Posts: 2
Topic starter  

Hello !
I'm doing a small theme for a friend, using the custom field "rating" for the comments, and have troubles on two things :
First, how to display the "result" of the field elsewhere than at the bottom of the post-content ? Something like this maybe ?

<?php the_field('rating'); ?>

Secondly, is there a way to display the top 3 rating posts on the front page ?

I hope you will be able to help me, thank you in advance for your time !


   
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

Hi @rascasse,

First, how to display the "result" of the field elsewhere than at the bottom of the post-content ? Something like this maybe ?

There is a  [wpdrating] shortcode for this purpose. Please read this support topic: 

https://gvectors.com/forum/important-information-and-announcements/wpdiscuz-4-0-7-is-released/#post-4467

Secondly, is there a way to display the top 3 rating posts on the front page ?

I'm sorry, but wpDiscuz doesn't have such a feature. If you're a developer you can do it using the value of wpdiscuz_rating_count field in wp_postmeta database table. 

Please note: wp_ is just a WordPress database tables default prefix. In your case, the prefix can be different.


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

Great, this is exactly what I need, thank you so much !

 


   
Share:
Scroll to top