wp_star_rating ( $args = array() )

  • (array) args { Optional. Array of star ratings arguments. @type int|float $rating The rating to display, expressed in either a 0.5 rating increment, or percentage. Default 0. @type string $type Format that the $rating is in. Valid values are 'rating' (default), or, 'percent'. Default 'rating'. @type int $number The number of ratings that makes up this rating. Default 0. @type bool $echo Whether to echo the generated markup. False to return the markup instead of echoing it. Default true. }
  • (string) Star rating HTML.
Defined at:
Change Log:
  • 4: .


Outputs a HTML element with a star rating for a given rating.Outputs a HTML element with the star rating exposed on a 0..5 scale in half star increments (ie. 1, 1.5, 2 stars). Optionally, if specified, the number of ratings may also be displayed by passing the $number parameter.

Related Functions

wp_installing, wp_user_settings, wp_set_all_user_settings, wp_set_lang_dir, wp_list_sort

Top Google Results

User discussions

wpseek mobile