The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] rating in archives
(@face2005)
Active Member
Joined: 5 years ago
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]
(@asti)
Illustrious Member
Joined: 8 years ago
(@face2005)
Active Member
Joined: 5 years ago
there is no function to display the rating by the post id?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8192
Feb 16, 2021 12:22 pm
@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
Feb 16, 2021 12:37 pm
@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(); ?>
(@face2005)
Active Member
Joined: 5 years ago