
Karina Star Ratings & Rich Snippets
v1.0.1Mohsen Hasanpour · 2026年11月25日 上架
Fast, accessible star ratings for any post type with automatic Schema.org AggregateRating rich snippets, a shortcode, a block and an Elementor widget.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 44
- 最近更新
- 2026年11月25日
贡献者
截图
Karina Star Ratings adds a lightweight star rating widget to your posts, pages and custom post types and automatically generates Schema.org AggregateRating structured data for every rated post that displays the rating, so search engines can show review stars in their results.
Highlights
- Automatic placement before or after the content of the post types you choose.
- Dynamic rich snippets: JSON-LD is generated per post from its real votes and printed only on pages that display the rating. Choose the schema type globally or per post.
- Shortcode
[ratingpress]for any theme, widget area or page builder. - Elementor widget with full style controls (size, spacing, colors, typography, responsive alignment) that works in Theme Builder templates.
- Block editor block that also works inside Query Loops.
- Top rated list with
[ratingpress_top]. - Import from kk Star Ratings in one click. Existing votes and averages are preserved and re-running the import never doubles numbers. Old
[kkstarratings]shortcodes keep working. - Duplicate protection: one vote per browser (cookie and local storage), per IP address, or unlimited. Logged-in users vote once per post. Browser mode stops accidental repeat votes but not determined scripts; the built-in per-IP rate limit and IP mode add server-side protection.
- Privacy friendly: IP addresses are stored only as salted one-way hashes. Integrates with the WordPress personal data exporter and eraser.
- Accessible: keyboard operable, screen reader labels, respects reduced motion.
- RTL ready and fully translatable.
- Cache friendly: voting uses the REST API and keeps working on cached pages.
- Fast: no jQuery on the front end, a single small script loaded only where ratings are shown, aggregates cached in post meta.
- Dashboard with vote statistics, distribution, top rated and recent votes.
- Sortable rating column in the posts list and a per-post sidebar panel to disable ratings, override the schema type or reset votes.
- Developer friendly: template tags, overridable templates and many hooks.
Shortcodes
[ratingpress] – rating widget for the current post.
Attributes: id, readonly, legend, heading, icon (star, heart, circle), align (start, center, end), layout (inline, stacked), size, class.
[ratingpress_top count="5" post_type="post" min_votes="1" thumbnail="true"] – list of top rated posts. `post_type` accepts a comma separated list of public post types or `any`; `count` is limited to 50.
Template tags
<?php if ( function_exists( 'ratingpress_the_rating' ) ) { ratingpress_the_rating(); } ?>
ratingpress_get_rating( $post_id ) returns the average, count, best rating and percentage.
To customize the markup, copy views/frontend/rating.php to your-theme/ratingpress/rating.php.
Hooks
ratingpress_schema– filter the JSON-LD of a post.ratingpress_print_schema– filter whether the JSON-LD is printed on the current page (by default only where the rating widget is displayed, including widgets printed by a theme template tag).ratingpress_schema_types– filter the available schema types.ratingpress_auto_insert– filter automatic placement per post.ratingpress_enqueue_assets– filter whether the assets load in the head of a singular page.ratingpress_can_vote– return aWP_Errorto reject a vote.ratingpress_vote_recorded– action after a vote is saved.ratingpress_rating_updated– action after the totals of a post change.ratingpress_rating_html/ratingpress_view_args– filter the widget output.ratingpress_client_ip– provide the visitor IP when behind a trusted proxy.ratingpress_template– filter the template file.
Languages
The interface is fully translatable and RTL ready. Translations are managed on translate.wordpress.org and are installed automatically by WordPress.
Third-party resources
- Vazirmatn font, used in the Karina Star Ratings admin screens. Copyright 2015 The Vazirmatn Project Authors. Licensed under the SIL Open Font License 1.1 (see
assets/fonts/vazirmatn/OFL.txt). The font is bundled with the plugin; nothing is loaded from external servers.
Privacy
When a visitor rates content, Karina Star Ratings stores the rating, the date, the user ID for logged-in users and a salted one-way hash of the IP address. To remember voted content, a cookie and a browser local storage entry (both named ratingpress_voted) containing only the IDs of the rated posts may be stored. No data is sent to external services. Suggested privacy policy text is added to the WordPress privacy policy guide.




