The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
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
Share:
Notifications
Clear all

[Solved] rating in archives

6 Posts
2 Users
1 Reactions
2,043 Views
Posts: 4
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
(@face2005)
Active Member
Joined: 5 years ago
[#1674]

Hey!
How do I display the rating on the archive page?
shortcode doesn't work like that.

[wpdrating metakey="all" show-label=false itemprop=false]


Topic Tags
5 Replies
Asti
Posts: 8207
 Asti
Support
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
(@asti)
Illustrious Member
Joined: 8 years ago

@face2005,

You can use the "Display Ratings" option. More info here: https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#display-ratings


Posts: 4
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
(@face2005)
Active Member
Joined: 5 years ago

there is no function to display the rating by the post id?


2 Replies
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8207
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

@face2005,

Please add the post_id attribute in the shortcode.

Your shortcode should look like this:

[wpdrating metakey="all" show-lable=true show-count=true show-average=true itemprop=true post_id="CURRENT_POST_ID"]

For example for the post with post_id= 5555 you should use the following shortcode:

[wpdrating metakey="all" show-lable=true show-count=true show-average=true itemprop=true post_id="5555"]

(@face2005)
Joined: 5 years ago

Active Member
Posts: 4
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
@asti

<?php $rating = new WP_Query( array(
'post_type' => 'teachers',
'p' => 555
) ); ?>
<?php while ( $rating->have_posts() ) : $rating->the_post(); ?>
<div class="lessonRating">
<?php echo do_shortcode( ' [wpdrating] ' ); ?>
</div>

<?php endwhile; wp_reset_postdata(); ?> 

Posts: 4
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
(@face2005)
Active Member
Joined: 5 years ago

thank you, it works!


Share: