Reaction Button
A custom WordPress plugin that displays three reaction icons: 'smile,' 'straight,' and 'sad.' This plugin allows logged-in users to submit their reactions by clicking on the corresponding icon. Users can also modify or delete their reactions at any time, similar to the reaction functionality on Facebook or LinkedIn.
by Anisur Rahman · github.com/anisur2805/arb-reaction-button · website
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/anisur2805/arb-reaction-button/archive/refs/heads/master.zipReadme
Reaction Button
A custom WordPress plugin that displays three reaction icons: Smile, Straight, and Sad. Logged-in users can submit reactions, modify them, or remove them at any time.
Usage
Shortcode
[reaction_button]
Elementor Widget
Find Reaction Button in the Basic category when adding widgets.
Gutenberg Block
Search for Reaction Button in the Widgets block category.
Features
- Three reaction types: Smile, Straight, Sad
- Toggle reactions: click same reaction to remove it
- Per-page reaction count display
- Logged-in users only for reactions
- Logged-out users see "please login" error
- Works with Shortcode, Elementor, and Gutenberg
- Multiple instances on same page work independently
- Dashicons loaded for logged-out users
Changelog
1.0.0
- Initial release
- Shortcode [reaction_button]
- Elementor widget
- Gutenberg block (server-side rendered)
- AJAX reaction submission with nonce verification
- Reaction toggle (click same reaction to remove)
- UNIQUE constraint on (user_id, post_id)
- Responsive design with hover popup for reaction selection