In this post, we will be seeing how to add Facebook-like reactions feature to posts in WordPress. This will allow your site’s visitors to express how they feel about your posts – whether they like it or are happy, sad, angry, etc. This also increases the user engagement on your site to a whole new level.
Steps to Add Facebook Reaction Buttons to WordPress
Step 1 – Install and activate the DW Reactions plugin by DesignWall on your site.
Step 2 – Visit the Settings –> Reactions page to configure the plugin settings.
Step 3 – Make sure the ‘Show reactions button’ checkbox is checked. Only then the plugin will display the reaction buttons on your posts. Else, it won’t display it even if the plugin is active.
Step 4– If you don’t want to show the number of reactions your posts have received, you can disable it by unchecking the ‘Show reactions count’ option.
Step 5 – Uncheck the ‘Users must be registered and logged in to add reaction’ option so that everyone is able to react to your posts, not just who are logged in to your site.
Step 6 – Choose where you want the reaction buttons to be displayed – whether above the content, below the content or both. I recommend you to display it below the posts for a better user experience on your site.
Step 7 – You can also choose where you want the reaction buttons to be displayed – be it on homepage, archives page, posts or pages. My recommendation is to display it only on posts.
Advanced Customization (For Advanced Users ONLY)
Step 8 – This plugin also allows you to place the reactions manually anywhere in your theme by editing the theme files (archive.php
, single.php
, post.php
and page.php
).
Step 9 – To do so, find <?php while (have_posts()) : the_post(); ?>
and add <?php if (function_exists('dw_reactions')) { dw_reactions(); } ?>
anywhere below it where you want the reactions to be displayed.
NOTE: If you do not want the reactions to be displayed in all the posts and pages, don’t make use of the above code. Instead, just type in [reactions]
into the desired post or page and the reactions will be automatically embedded to that specific post/page only.
Conclusion
If you found this post helpful and are interested in setting up Facebook-styled reactions for your WordPress site, you can grab your copy of DW Reactions right away!
If you liked this, you might also be interested in reading my post on how to add likes and dislikes to comments in WordPress.
Good to know all these cool stuffs. Keep posting dude.
Sure Shravanti Nath, I will! ✌️️
Great … 😄 Blog is Simply outstanding… Keep it Up ✌
Thanks for the kind words Abhi! 🙂 You’ve got a nice blog too…👌
Thank you so much 🙃
Do you know how to know who reacted to something? How to display the name of the logged in person?