Support Center

Frequently asked questions and support documentation for RatingWidget.

Results

  • Can I add a rating inside my WordPress post’s content?

    We created a special shortcode you can use inside your posts / pages editor.

    For post ratings:

    • Current post rating - [ratingwidget]
    • Specified post rating - [ratingwidget post_id=123]

    For page ratings:

    • Current page rating - [ratingwidget type="page"]
    • Specified page rating - [ratingwidget type="page" post_id=123]

    For random ratings (not bound to any page/post):

    • Rating - [ratingwidget_raw id="1" title="my-title" type="page"]

    Rich-Snippets support:
    If you are using our Professional or Business plan which supports Rich-Snippets integration, and you want that the rendered rating will have the relevant schema, please add the add_schema=true attribute to the shortcode. For example:
    [ratingwidget post_id=123 add_schema=true]

    Note: If you already have a rating with schema.org on the same page, adding additional rating with schema.org metadata will confuse search engines, and will cause your ratings disappear from SERP.

  • Is there any PHP shortcodes I can use for my custom posts templates?

    We created several custom PHP shortcodes to make it easy for you adding RatingWidget into your custom templates or even if you want to customize the exact location of the ratings in your pages.

    Here are the shortcodes:

    • Output post / page / comment rating:
      function rw_the_post_rating($postID = false, $class = 'blog-post', $schema = false);
    • Return post / page / comment rating:
      function rw_get_post_rating($postID = false, $class = 'blog-post', $schema = false);
    • Output user rating:
      function rw_the_user_rating($userID = false);
    • Return user rating:
      function rw_get_user_rating($userID = false);

    Usage example:

    <?php rw_the_post_rating(14, 'front-post'); ?>

    Params:

    • $postID – The post id. Defaults to current’s loop post id.
    • $class - Rating class/type. For front page posts use ‘front-post’, for posts use ‘blog-post’, for pages user ‘page’, for comments use ‘comment’.
    • $schema - If TRUE, add Rich-Snippets schema.org metadata (only for Professional customers).
    • $userID - User ID. Defaults to current’s loop user.

    You can find the shortcodes implementation in /rating-widget/lib/rw-shortcodes.php