1. Home
  2. Docs
  3. Shortcodes
  4. YASR Free
  5. yasr_visitor_votes
Remember: You don't need to keep in mind all the shortcodes. You can use the shortcode creator if you're using the Classic Editor, or just add a block if you're using Gutenberg.

yasr_visitor_votes

Description

Shows the Visitor Votes for a post or page.


Parameters

size
(optional) Size of the stars.
Accepted values: “small”, “medium”, “large”.
default: large
postid
(optional) The post ID
default: the post ID of the current post or page
readonly
(optional) Set if the stars set should be clickable or not. Useful if you want to show an average rating from another post or page, or in a different part of the template.
Accepted value: “yes”.
default: false

Examples

What do you think about this?
[Total: 21 Average: 4]
will show the Visitor Votes with large stars set (default) for the current post or page
will show the Visitor Votes with medium stars set for the postid 2548, not clickable