Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] wpDiscuz stars rate

3 Posts
2 Users
0 Reactions
2,310 Views
(@rascasse)
New Member
Joined: 7 years ago
Posts: 2
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
  [#3711]

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: 8 years ago
Posts: 6645
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
 

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: 7 years ago
Posts: 2
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
 

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

 



   
Share:
Scroll to top