Star Ratings plugin for Craft CMS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
CHANGELOG.md
LICENSE.md
README.md
composer.json

README.md

Star Ratings plugin for Craft CMS

An easy to use and highly flexible ratings system.


This version is for Craft 3. To install it, visit the Plugin Store in your site's Control Panel.

For the Craft 2 version, see doublesecretagency.com/plugins/star-ratings


Rate Elements

Just specify the element ID of the item you want to rate. Any element type (Entry, Asset, User, etc) will work!

{{ craft.starRatings.stars(entry.id) }}

Customize Star Icons

It's easy to customize your star icons. You can either adjust the CSS, or replace the icons entirely.

{% do craft.starRatings.setIcons({
    full  : '<i class="fa fa-thumbs-up"></i>',
    half  : '<i class="fa fa-thumbs-o-up"></i>',
    empty : '<i class="fa fa-circle-thin"></i>',
}) %}

By default, Star Ratings uses the Font Awesome library. Which means you can easily swap to a different icon from the Font Awesome collection. And if you'd rather not use Font Awesome, you can disable the library from being included at all.

Sort by Highest Rated

Once your users have cast ratings, you'll want to know which items are the highest rated...

{% set hotels = craft.entries.section('hotels') %}
{% do craft.starRatings.sort(hotels) %}

This will grab the list of elements normally, then sort them by highest rated.

Settings

Here's a screenshot of the plugin's settings page...

To see some other ways that Star Ratings is flexible, check out the full documentation...


Anything else?

We've got other plugins too!

Check out the full catalog at doublesecretagency.com/plugins