[Resolved] [Plugin: Reaction Buttons] Display reaction count
Loving this plugin – it’s exactly what I have been looking for. I run a music blog and this is by far the easiest and best way to get readers’ reaction of songs/albums without waiting for a few people to comment.
That’s kind of why I am posting on this forum. I want to be able to display “reaction count” on the post meta data section on the index and single pages. Instead of a “comment count”, I want there to be a “Reaction” count (i.e. “xx Reactions”). I hope it won’t be too difficult because I know the plugin keeps track of the number of clicks/reaction each post receives because of this stats page: http://i54.tinypic.com/219v3p0.png
Basically, I want the number in the parenthesis (pictured) on the post meta data section. Is this possible?
I’ll release a version later this day with this feature. I’m just working on integrating some features I got a few weeks ago.
It’s in v1.1. reaction_buttons_click_count($post_id) returns the number of all clicks for the post with the $post_id.
Wow, thank you very much! I’m not particularly good at even the simplest php editing. I added this to my theme:
<span class="head"><?php _e('Reactions') ?></span> <span class="body"><?php reaction_buttons_click_count($post_id); ?></span>
And the reaction click count is not showing up. What am i doing wrong?
Oh well, sorry, the function takes the post id as parameter. e.g.
But usually you want it dynamic in your theme. While you are “in the loop” (you usually are while dealing with posts in the standard themes), the following will most likely work for you:
<span class="body"><?php echo reaction_buttons_click_count(get_the_ID()); ?></span>
wondering if there is a simple way to not display the vote count and just display “voted counted” instead.
No, there is no way to not show the reactions after someone clicked. You can use CSS to use an image as the buttons.
well i got rid of the number [Vote(1)], and votes are being counted. the only other thing is i would need to make it popup and say “vote counted” like it does when you have already voted.
for example AFTER the vote, show vote text like:
- The topic ‘[Resolved] [Plugin: Reaction Buttons] Display reaction count’ is closed to new replies.