WordPress Review Plugin - Getting Started - Shortcodes


Shortcodes

Back to User Guide

TIP: What Are Shortcodes

Shortcodes add dynamic content to your site via a small piece of code.

Learn more: Shortcodes - How To Use | Finding ID of Post/Page/Other Content

You can find the WordPress Review plugin shortcodes list by navigating to Admin Dashboard → CM Reviews → Shortcodes:

Navigation to the plugin shortcodes list - Customer Reviews Plugin
Navigation to the plugin shortcodes list

Display the Full Rating and Review Module

  • Shortcode - [cmr_general]
  • Use - Displays the rating and review module according to the plugin Settings. If the "Auto add shortcode" setting is enabled (learn more), it will be added at the end of content of selected post type posts. 
  • Parameters:
    • postid - If you like to display the ratings from other post than the current post you can pass its id.
    • no_title - If set to "1", the shortcode will not display the title.
    • no_wrapper - If set to "1", the shortcode will not be wrapped with the div with predefined style. Note: the parameter view must be "0".
    • wrapper_class - If no_wrapper="0", you can specify a custom class name for div elements. Note: the parameter view must be "0".
    • no_table - If set to "1", the shortcode will not display the rate histogram table.
    • view - If set to "1", the shortcode will display with following layout:

      Displaying the full rating and review module - WordPress Plugin Star Rating for Reviews
      Displaying the full rating and review module

      Parameter View

      If the parameter view="1" and postid is not specified, then the shortcode will display all reviews on your site. In this case you can also configure a button that can refer to the page with a review form. The attributes are:

      • note - Add a note.
      • buttontext - Define the text for the button.
      • buttonurl - Define the URL for a button.
    • Example:

      Displaying the form with additional parameters - WordPress Testimonials Manager Plugin
      Displaying the form with additional parameters
  • Example: [cmr_general postid="123" no_title=0 no_wrapper=0] 

    Displaying reviews and rating of the specific post - Review Plugin for WordPress
    Displaying reviews and rating of the specific post

Note: the shortcode [cmr_general] can also accept parameters of other shortcodes.


Display Ratings

  • Shortcode - [cmr_ratings]
  • Use - Displays the ratings according to the plugin Settings.
  • Parameters:
    • postid - If you like to display the ratings from other post than the current post you can pass its id.
    • no_title - If set to "1", the shortcode will not display the title.
    • no_wrapper - If set to "1", the shortcode will not be wrapped with the div with predefined style.
    • wrapper_class - If no_wrapper="0", you can specify a custom class name for div elements.
    • no_table - If set to "1", the shortcode will not be display the rate histogram table.
    • display_average - If set to "1", the shortcode will display the average score (default is 1).
    • display_counter - If set to "1", the shortcode will display the total number of votes (default is 1).
    • hide_if_no_rating - Set to "1" to hide star rating if the post is not rated yet.
    • hide_empty - Set to "1" to hide star rating and rate histogram at one if the post is not rated yet.
    • display_link - Set to "1" to display the amount of rates as a link, and set to "0" to display it as plain text.
  • Examples: [cmr_ratings no_table=1] / [cmr_ratings no_table=0] 

    Displaying ratings - Customer Review Plugin for WordPress
    Displaying ratings

Display only star ratings
You can use the shortcode  [cmr_post_summary postid="x"] to display only the rating as well.
Displaying only star ratings - Product Review WordPress Plugin
Displaying only star ratings

Example: [cmr_post_summary postid="4"]


Display Reviews

  • Shortcode - [cmr_reviews]
  • Use - Displays the review module (displaying the reviews for page/post) according to the plugin Settings.
  • Parameters:
    • postid - If you like to display the ratings from other post than the current post you can pass its id.
    • no_title - If set to "1", the shortcode will not display the title.
    • no_wrapper - If set to "1", the shortcode will not be wrapped with the div with predefined style.
    • uid - If this attribute is specified, and contains the Review ID only this single review will be displayed. Note: must be used only with specified post in the parameter postid.
    • show_date - If set to "0", the shortcode will not display the date. If the attribute is not present, the shortcode will follow the plugin's general settings.
    • hide_if_no_rating - If this option is set to "1", zero voted rating won't be shown (default value is "0").
    • view - You can set "classic", "tile" or "carousel" view. Note: this parameter was introduced in version 3.0.6.
  • Sample: [cmr_reviews postid="123" no_title=0 no_wrapper=0 show_date=1] 

    Displaying reviews - WordPress Testimonials Plugin
    Displaying reviews


Single Review

  • Shortcode - [cmr_review_single uid=xxx]
  • Use - Displays the rating and review module according to the plugin Settings. If the "Auto add shortcode" setting is enabled (learn more), it will be added at the end of content of selected post type posts.
  • Parameters:
    • postid - If you like to display the ratings from other post than the current post you can pass its id.
    • no_title - if set to "1", the shortcode will not display the title.
    • no_wrapper - If set to "1", the shortcode will not be wrapped with the div with predefined style.
    • uid - If this attribute is specified, and contains the Review ID only this single review will be displayed. Note: must be used only with specified post in the parameter postid.
  • Sample: [cmr_review_single postid="258" uid="5a9829360831c"]

    Displaying a single review - WordPress Rating Plugin
    Displaying a single review


Review Form

  • Shortcode - [cmr_review_form]
  • Use - Displays the review form according to the plugin Settings.
  • Parameters:
    • postid - If you like to display the ratings from other post than the current post you can pass its id 
    • select_postid - If this option is set to "1" the form will display the selector of all posts/pages which can be reviewed
    • selectable_ids - You can use this attribute to override the selection if you are using the "select_postid" attribute. Use comma separated list of post ids to be reviewed.
    • as_link - If in plugin settings is chosen Form appears on click in the option Form display, then you can display a link instead of a button to open a review form by setting the value "1".
  • Sample: [cmr_review_form]

    Displaying the review form - WordPress Rating Widget
    Displaying the review form

Delete Reviews

  • Shortcode - [cmr_delete]
  • Use - Displays a link that triggers a pop-up. It includes an option to delete all ratings and reviews.
  • Parameters:
    • none
  • Sample:

    Link for deleting reviews - WordPress Rating System
    Link for deleting reviews

Show All Reviews

  • Shortcode - [cmr_all_reviews orderby="random|post|date|post|content|rating|author_email" sort_order="ASC|DESC" ]  
  • Use - Shows all reviews in an organized way.
  • Parameters:
    • orderby - Defines by what element the list will be ordered. Accepts only one: "random", "post", "date", "post", "content", "rating" or "author_email".
    • sort_order - Defines how the list will be sorted. Accepts only one: "ASC" and "DESC".
  • Sample: [cmr_all_reviews orderby="rating" sort_order="DESC"]

    Displaying all reviews - Customer Reviews Plugin
    Displaying all reviews

Show Ratings Table

Note: this shortcode was introduced in version 2.9.8.

  • Shortcode - [cmr_ratings_table]
  • Use - Displays the table with ratings of all rated posts/pages.
  • Parameters:
    • none
  • Sample: The table has 3 columns and a sorting tool:
    • Title - Shows the title of the rated post/page.
    • Rating - Shows the summary rating of the post/page.
    • Your Rating - Displays the post/page link, offering the user to go to the post and rate it.
    • Sort By - Allows to sort the table by Title, Score or Number of Reviews in ascending or descending order. 

      Displaying a ratings table - WordPress Plugin Star Rating for Reviews
      Displaying a ratings table

TIP

You can change the labels in the table in plugin settings. Learn more: WordPress Review Plugin - Customization - Labels


More information about the WordPress Review Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.