WP Manifestindependent plugin directory
manifest / social / cecava-wp-post-rating

Plusinn WP Post Rating

Custom WordPress plugin that attaches a lightweight thumbs-up / thumbs-down rating widget plus a quick contact popup to every blog post.

by Plus Innovative · github.com/mileticslobo/cecava-wp-post-rating

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/mileticslobo/cecava-wp-post-rating/archive/refs/heads/main.zip

Custom WordPress plugin that attaches a lightweight thumbs-up / thumbs-down rating widget plus a quick contact popup to every blog post. Votes are stored per post, duplicate votes are blocked via logged-in tracking + cookies, and a shortcode lets you place the widget anywhere else (landing pages, custom templates, etc.).

Features

  • Automatic injection after post content (single posts only).
  • AJAX thumbs-up / thumbs-down controls with live count + approval percentage.
  • Duplicate prevention for logged-in users (user meta) and guests (cookies per post).
  • [wp_post_rating] shortcode with optional post_id attribute.
  • Contact link opens a popup that renders any Contact Form 7 shortcode you provide (per-post context is passed to JavaScript events).

Installation

  1. Copy the plugin folder (plusinn-wp-post-rating) into wp-content/plugins/ on your site.
  2. Activate Plusinn WP Post Rating from Plugins → Installed Plugins.
  3. Visit any single post to see the widget appended under the content.

Shortcode Usage

[wp_post_rating]

Optional attributes:

  • post_id="123" – Render ratings for a specific post while embedding elsewhere.

Example:

[wp_post_rating post_id="42"]

Contact Modal

  • Create a form with the Contact Form 7 plugin (include any fields you need).
  • Copy its shortcode and paste it into Settings → Plusinn WP Post Rating.
  • A “Send anonymous recommendation” button appears beneath each rating widget; clicking it opens a popup that renders your CF7 form.
  • Hidden inputs named wpr_post_id and wpr_post_title are automatically injected into the CF7 form when the popup opens; reference [wpr_post_id] or [wpr_post_title] in your CF7 mail template to include the article metadata.
  • When the modal opens, the plugin still emits a wprContactOpen browser event with { postId, postTitle } in case you want to run additional custom scripts.

Styling

Minimal CSS is included in assets/css/wp-post-rating.css. Override classes (prefixed with .wpr-) in your theme or via the Customizer if you want to restyle the widget.

Notes

  • Votes are stored as post meta keys _wpr_up_votes and _wpr_down_votes.
  • Logged-in users get their voted post IDs recorded in user meta _wpr_voted_posts.
  • Guests are limited with cookies named wpr_vote_{postId} lasting one year.
  • Text strings live under the plusinn-wp-post-rating text domain. A starter Serbian (sr_RS) translation is shipped and works with Cyrillic/Latin transliteration plugins.

Changelog

  • 1.0.0 – Initial release with thumbs up/down voting, shortcode support, duplicate protection, CF7 modal, and localization scaffolding.

License

Released under the GNU General Public License v2.0 or later. See LICENSE for the full text.