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.
