Show an Aggregate Rating

Starting in version 2.5, there is a new shortcode and PHP function to get the rating data from your rotator.

To show the star rating simply use this shortcode:
[testimonial_rotator_rating id="ROTATOR_ID"]

To show the rating as a number use this:
[testimonial_rotator_rating id="ROTATOR_ID" return="rating"]

PHP Function

You can call this function from your theme templates:

testimonial_rotator_rating( $id, $return = 'stars' )

You can pass in the Rotator ID that is found in the admin. The second parameter is the return type you want.

  • starsdefault – Returns the global rating as a list of star icons. There is a .testimonial_rotator_stars wrapper around them if you want to target them for CSS.
  • rating – Returns the value as a number
  • data – Returns an object with the total_ratings and rating