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.

開発バージョンは、 https://github.com/martinjankov/simple-star-rating-block で見つかります。

機能 :

  • 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.

任意のセクション

追加情報 :

より高度な使用方法として、ブロックのフィルターとアクションをフックして機能を拡張することができます。これは、スター評価を他のプラグインやカスタムコードと統合したい開発者にとって特に便利です。

サポート :

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

スクリーンショット

ブロック

このプラグインは1個のブロックを提供します。

  • Simple Star Rating Block Star Rating Block allows you to display star ratings with manually entered value or pulled from a custom field.

インストール

Star Rating Block プラグインをインストールするには、以下の手順に沿ってください。

  1. アップロード: プラグインのファイルを /wp-content/plugins/simple-star-rating-block ディレクトリにアップロードします。
  2. 有効化: WordPress の「プラグイン」画面からプラグインを有効化します。
  3. 設定: Gutenberg ブロックの設定から、ニーズに合った設定を行います。

FAQ

投稿、ページ、カスタム投稿タイプにスター評価を追加するには ?

Gutenberg ブロックインサーターから「 Star Rating Block 」を追加し、希望の評価を設定するか、カスタムフィールドにリンクするだけです。

スター評価の外観をカスタマイズできますか ?

はい、Gutenberg エディタのブロックの設定でスターのサイズ、色、スタイルをカスタマイズできます。

カスタムフィールドキーのリストに ACF フィールドがないのですが ?

ACF フィールドをリストに表示するには、REST API でフィールドが表示される ACF グループを有効にする必要があります。その方法についてはスクリーンショット 4 を参照してください。

評価

このプラグインにはレビューがありません。

貢献者と開発者

Simple Star Rating Block はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Simple Star Rating Block” は1ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“Simple Star Rating Block” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログを RSS で購読してみてください。

変更履歴

0.3

  • Accessibility: the block now renders with role="img" and a “Rated X out of 5” label; individual stars are hidden from screen readers
  • Fixed invalid HTML on the frontend (block-level elements inside an inline wrapper)
  • Ratings are now clamped to the 0–5 range, including values pulled from custom fields
  • Correct post is now used when the block renders inside a Query Loop
  • Custom fields now load correctly in the editor for custom post types with a custom REST base
  • Performance: removed ~13KB of unused CSS from the frontend stylesheet
  • Hardened inline style output
  • Compatibility: tested up to WordPress 7.1
    Release Date – 30 July 2026

0.2

  • Bug fix where default custom fields were not showing in the list
    Release Date – 03 January 2025

0.1.1

  • カスタム投稿タイプからカスタムフィールドを正常に取得できるようになりました
    リリース日 – 2024 年 8 月 11 日

0.1.0

  • 初回リリース
    リリース日 – 2024 年 7 月 7 日