跳到内容

Five-Star Ratings Shortcode

v1.2.63

Chris J. Zähller · 2019年12月8日 上架

Simple lightweight shortcode to add 5-star ratings anywhere.

正在使用
500+
评分
4.2 / 5
累计下载
2.9 万
最近更新
2026年10月10日
5 条评价需要 WordPress 4.6.1+已测试到 7.1.5PHP 7.4+

Add accessible, attractive 5-star ratings anywhere on your site with a simple shortcode. The plugin uses Font Awesome icons via their SVG + JavaScript method.

Acknowledgement

This plugin is based on Hugh Lashbrooke’s Starter Plugin, a robust and GPL-licensed code template for creating a standards-compliant WordPress plugin.

PRO only features

  • Google Rich Snippets for Products, Restaurants, & Recipes
  • Custom icon sizes
  • Custom icon and text colors
  • Choice of HTML <i> or <span> elements in HTML output
  • Change maximum rating (from 3 – 10)
  • Change minimum rating (0.0, 0.5, or 1.0)
  • Shortcode generator
  • Show/hide numeric text
  • Locale aware decimal separator
  • Options reset button

Usage Examples

[rating stars=”3.0″] (Displays 3 stars out of 5)
[rating stars=”2.5″] (Displays 2½ stars out of 5)
[rating stars=”4.0″] (Displays 4 stars out of 5)
[rating stars=”5.5″] (Incorrect usage but will display 5 stars out of 5)

In the 2nd example, the raw output will be like this before processing:

<span class="fsrs">
  <span class="fsrs-stars">
    <i class="fsrs-fas fa-fw fa-star"></i>
    <i class="fsrs-fas fa-fw fa-star"></i>
    <i class="fsrs-fas fa-fw fa-star-half-alt"></i>
    <i class="fsrs-far fa-fw fa-star"></i>
    <i class="fsrs-far fa-fw fa-star"></i>
  </span>
  <span class="hide fsrs-text fsrs-text__hidden" aria-hidden="false">2.5 out of 5</span>
  <span class="lining fsrs-text fsrs-text__visible" aria-hidden="true">2.5</span>
</span><h3>Translations</h3>

* English: Default language, always included

Would you like to help translate Five-Star Ratings Shortcode into your own language? You can do that here!

Dependencies

This plugin includes these third-party libraries in its package.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums