Yasr basics shortcodes
Overall Rating shortcode is read only and is used by the reviewer.
It’s available in 3 different sizes: “Small”, “Medium” or “Large” (here you can see the large one).
In the settings, you can customize the text shown before or after.
You can manually place the shortcode where you need, or use the auto insert feature, see the video tutorial here.
How to use it?To insert the rating in this widget, thare are two ways:
If you're using the Classic editor, simply give a rating in the YASR metabox that appear at the top right of the screen while you're writing a new post or page.
If you're using the new Gutenberg editor, click on the "+" icon to add a block, search for YASR and select YASR: Overall Rating. A new panel will appear to the right: you can add your rating here.
This is Visitor Votes. With it you can:
– Choose to allow anonymous or logged in only users.
– Logged in users can update their vote anytime.
– Size can be “Small”, “Medium” or “Large”.
– You can customize the text shown before or after.
– Hover on the chart bar icon to see the stats.
Feel free to use it here.
How to use it?
You can paste the shortcode yasr_visitor_votes where you need to show the widget, or you can use the auto insert feature as explained in this tutorial. If you're using the new Gutenberg editor, click on the "+" icon to add a block, search for YASR and select YASR: Visitor Votes.
Visitor Votes Read Only
In some cases you may need to show an average of your visitor’s votes, but without allowing them to rate it (e.g. in a category page).
In this case, just add the readonly=”yes” parameter to yasr_visitor_votes shortcode.
What if you want show ratings from another post or page?
All these shortcodes can be used along with the postid parameter. So,if you wish to show a rating from another post or page you can just use the postid, e.g. yasr_overall_rating size="medium" postid="XXXX"