[gdrts_stars_rating]

This shortcode displays rating block for any rating item, and you need to specify which item to show. If template, style, alignment and distribution attributes are missing, the plugin will use default values.

List of attributes

  • type: entity and name of the type connected with a dot like this: {entity}.{name} and both are required.
  • id: real ID of the item you want to show. If this is for the post, this is post ID.
  • item: internal item ID of the item you want to show. If you provide this number, you don’t need to provide type/id attributes.
  • class: CSS class for the shortcode wrapper.
  • template: name of the template to use for display. Supported values: default, classic, expanded and more. List of templates can be expanded, and list of all available templates is listed on the Templates panel in Information menu. This shortcode can use templates listed under Stars Rating / Single Block.
  • alignment: alignment of the rating block. Supported values: left, right, center, none.
  • distribution: rating votes distribution display method. Supported values: normalized, exact.
  • style_type: what to use, font icons or images. Supported values: font, image.
  • style_font_name: name of the font icon to use. Supported values: star, bell, heart, asterisk, square, circle, gear, trophy, like, snowflake.
  • style_image_name: name of the image to use: Supported values: star, oxygen. Pro version has also: christmas, crystal, hearts, snowflake.
  • style_size: size in pixels for the font icon or image.
  • style_class: additional CSS class to add to rating block wrapper.

Example

[gdrts_stars_rating type="posts.page" id=1
template="expanded" style_size=48 style_type="font"
style_font_name="circle"]
3
0
1028
Rate this reference

You are not allowed to rate this post.

7 Comments

  1. tristadeleon says:

    I can’t get this to work. It displays the same rating for all my products when using this shortcode
    https://www.scentswarmers.com/buy/scentsy/aloha-citrus-scentsy-bar-2
    [gdrts_stars_rating type=”product.page”
    template=”expanded” style_size=30 style_type=”image”
    style_font_name=”star”]

    1. MillaN says:

      Most likely that the ‘type’ is invalid. Is the Product/Page registered Entity/Type, because it is not one of the registered by the plugin?

  2. tristadeleon says:

    but even this does nothing – [gdrts_stars_rating]

    1. MillaN says:

      Hi,

      Shortcode, when added to the content, will be visible only if the content is displayed on the frontend. From the quick inspection of your page, I don’t see that a shortcode is added to the page. Even if the shortcode doesn’t work, it will show at least empty DIV, and there is nothing.

      Most likely is that the theme or plugin for the store doesn’t display the content of the product, or it maybe doesn’t run shortcodes for it. Based on the HTML of your page, it doesn’t display content the way WordPress does and the way the shortcode is processed. This issue is not related to my plugin, your theme needs to display WordPress post content for the shortcode to be processed. If your theme doesn’t do that for whatever reason, you would need to use PHP function to integrate rating. You are using WooCommerce, and WooCommerce by default works fine, so my guess is that theme is the issue.

      Milan

  3. tristadeleon says:

    I need to use shortcode because I use templates for my product pages.

  4. tristadeleon says:

    It worked on lite version….I’ve used your plugin for years. I just paid for pro and now it looks like it doesn’t like WP Bakery. look how it’s displaying here: https://www.scentswarmers.com/buy/scentsy/aloha-citrus-scentsy-bar-2

  5. tristadeleon says:

    ah, I fixed it.. in WP Bakery, now for it to work in PRO , I have to create a new row .. then add it to a txt block..

Leave a Reply