跳到内容

Simple Star Rating Block

v0.3

MartinCV · 2024年8月11日 上架

A lightweight, accessible Gutenberg block for star ratings — enter a value manually or pull it live from a custom field (ACF supported).

正在使用
70+
评分
暂无
累计下载
2,079
最近更新
2026年7月31日
需要 WordPress 6.1+已测试到 7.1.5PHP 8.0+

贡献者

截图

Star Rating Block in Action: Demonstrates the star rating block as displayed on a post or page.
Star Rating Block in Action: Demonstrates the star rating block as displayed on a post or page.
Block Settings Panel: Shows the settings available for customizing the star rating block.
Block Settings Panel: Shows the settings available for customizing the star rating block.
Star Rating Block in Action In Post Context: Demonstrates the star rating block as displayed on a post or page.
Star Rating Block in Action In Post Context: Demonstrates the star rating block as displayed on a post or page.
Enable Option for ACF Group to pull rating from ACF Field : Enable "Show in REST" so that the ACF Group can show in the Fields list on the Simple Star Rating Block
Enable Option for ACF Group to pull rating from ACF Field : Enable "Show in REST" so that the ACF Group can show in the Fields list on the Simple Star Rating Block

Show a star rating anywhere, in seconds. Drop the Simple Star Rating Block into any post, page, or custom post type, set a value from 0 to 5 (half and decimal values render as partial stars), and style it to match your site. Ideal for product reviews, recipe ratings, testimonials, and comparison posts.

Ratings can be typed in manually or pulled dynamically from a custom field — including ACF fields — so a rating stored on the post updates the block automatically. Inside a Query Loop, the block always shows the rating of the correct post.

Development Version can be found on: https://github.com/martinjankov/simple-star-rating-block

Features:

  • Manual or dynamic: Type a rating, or bind the block to a custom field on the post — works with custom post types, including those using a custom REST base.
  • ACF Integration: Pull the rating from an ACF field — just enable “Show in REST” on the ACF Field Group (see screenshot 4).
  • Partial stars: Decimal ratings like 4.3 render as precisely filled stars.
  • Accessible: Screen readers announce a clear “Rated 4.5 out of 5” label instead of empty markup.
  • Your style: Adjust star color and size per block; the stars scale with your typography.
  • Featherweight: A few hundred bytes of CSS, no external assets, no JavaScript on the front end.

Arbitrary section

Additional Information:

For more advanced usage, you can hook into the block’s filters and actions to extend its functionality. This is particularly useful for developers who want to integrate the star ratings with other plugins or custom code.

Support:

If you encounter any issues or have questions, please contact us directly at martin@martincv.com.

Plums

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

导航

说明

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

© 2026 Plums