CM Reviews and Ratings - 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 CM Reviews shortcode from inside the Shortcodes page which you can navigate to by finding the CM Reviews menu on your Admin dashboard and accessing the "Shortcodes" link from there, as shown below:


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.
    • no_table - If set to "1", the shortcode will not be display the rate histogram table.
  • Example  [cmr_general postid="123" no_title=0 no_wrapper=0] 

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.
    • 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 - If set to 1, the shortcode will only load if the page/post has at least one rating.
  • Examples  [cmr_ratings no_table=1] / [cmr_ratings no_table=0] 

Display only star ratings
You can use the shortcode  [cmr_post_summary postid="x"] to display only the rating as well.

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
    • 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.
  • Sample  [cmr_reviews postid="123" no_title=0 no_wrapper=0 show_date=1] 

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
  • Sample  [cmr_review_single uid=5a9829360831c]

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.
  • Sample  [cmr_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:

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

More information about the CM Reviews and Ratings WordPress  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