Loading...

Yasr basics shortcodes

Overall Rating

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.

There are two ways to insert the rating in this widget:

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.

Visitor Votes

What do you think about this?
[Total: 3672 Average: 4]

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_overall_rating 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"

Leave a Reply

Your email address will not be published. Required fields are marked *

14 thoughts on “Yasr basics shortcode

      1. Ok, grazie mille! πŸ™‚ Altra domanda.. come mai su alcuni articoli mi da la possibilitΓ  di votare e su altre invece no?

    1. Hi, of course!

      Just add the shortcode [yasr_visitor_votes] where you want to make appear the star set πŸ™‚

      Best,
      Dario

  1. Hi. Nice plugin .. Just a quick question .. is there any way to add it by shortcode? I mean in my web i want to use in the homepage as well … but it shows on the left side down on the footer and makes the design ugly … Any idea? Best Regards

  2. Can a shortcode start inline with a previous text or have text after? I have a two ranking system, and want to put the stars before or after the previous 100-point system. But it always goes to the next line, no matter how I edit the HTML.

    1. Hi Pablo, of course is possible πŸ˜‰

      You can do it by placing the shortcode manually or even when auto insert is enabled.

      Best,
      Dario