Reaction Buttons

This addon adds buttons below your posts (or somewhere else) to make it easy to get reactions to the post, but without the hassle of writing a whole comment. It makes it easier for the reader to interact with you. The buttons are configurable (how many, what text, position) and simply are counters to how often they were clicked. There is also a widget and a shortcode to show the top x posts with the most clicks for each button.

The idea is inspired by a blogger feature and since it’s been my first addon, I borrowed the structure from sociable.


  • When using plugins to cache the pages, the buttons won’t be up to date. They will increment through the javascript, but when the page reloads the old count will show again, until the cache is deleted. Check the FAQ on possibilities how to change that.


Latest version: Download Reaction Buttons v2.1.6 [zip]


Nothing fancy, just like any wordpress addon:

  1. Upload and unzip the plugin to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‚Plugins‘ menu in WordPress
  3. Optionally configure the plugin in the settings tab


Q. Installation Instructions
A. Nothing fancy, just like any wordpress addon:

  1. Upload and unzip the plugin to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‚Plugins‘ menu in WordPress
  3. Optionally configure the plugin in the settings tab

Q. Are there any shortcodes?

Q. My reaction buttons don’t update

  • Is your PHP installation new enough? Reaction buttons require at least PHP 5.2.
  • Do you use a cache plugin? When the page is cached as soon as you reload the page your vote isn’t shown anymore until the cache is cleared. See below.
  • (This shouldn’t apply since version 2.0.0 anymore.) Do you use any special characters like exclamation marks in your button names?

Q. I want to deactivate reaction buttons in certain situations

  • Next to the normal options (categories, page types, post options, …) you can set the global variable $reaction_buttons_deactivate to true e.g. in your plugin or certain theme regions to deactivate reaction buttons during the execution of that code. But don’t forget to set it to false again when you are done!

Q. How can the plugin work with plugins that cache the posts to increase page performance?

  • I added an option to refresh the cache of a page after a button was clicked. But the cache plugin has to be supported by reaction buttons.

Q. What cache plugins are supported for automatic cache refresh?

Q. My plugin isn’t listed, can you add support?

  • Sure, use the wordpress support forums with a link to the plugin and I’ll check it out next time I’ve got time for the plugin. If you want it fast, check the documentation of the cache plugin and find me the function to delete single page caches. Then it shouldn’t be a problem to implement shortly.

Q. How can I prevent users from voting twice?
A. There is an option „Use cookies“ in the settings that sends cookies to prevent the user to vote twice on the same post/button (depending on other settings).
It surely is not secure against somebody with bad intent, since they can just delete the cookie and reload the page. If I would save the IP instead, most users could reconnect their internet connection and get a new IP and sometimes on high traffic sites, a user wouldn’t be able to react, because somebody else with this IP already clicked. This plugin wants to make it easy to get the users reactions and easy and secure don’t work together. The only secure way is letting them log in, but then you wouldn’t get any reactions at all, since 99,9% wouldn’t bother.



  • You should be able to use apostrophes in button names now.



  • Fixed v2.0 upgrade routine


  • Added filter to conditionally disable the output based on post type. Check here for an example. Thanks Matt Cromwell!
  • Fixed deprecated syntax when adding the settings menu, thanks flufftron!
  • fixed some typos and such


  • Added css-class ‚rb-chosen‘ that is added to the clicked button when only one click is allowed. If you allow to click each button at least once, use the old voted class instead.


  • fixed https related problem (replaced bloginfo() with site_url())


  • added the possibilities to sort the buttons by votes


  • Changed the structure, CSS updates of custom CSS will be necessary.
  • Changed the way buttons are saved. They are simply numbered now, so there shouldn’t be any problems with special characters. The plugin should automatically convert your reaction counts on the first run to the new system.
  • New graph feature, display the votes as a graph instead of buttons. This will possibly look bad and need css updates to match your blogs style.


  • bump for new wordpress version


  • fixed an error in the new widget controls



  • added German translation
  • fixed a few errors regarding translation


  • updated a few functions that were deprecated and threw notices on systems running with debug


  • added the option to show the full post in the widgets
  • fixed an error that read the wrong settings variable for the one widget
  • fixed an error in the „clicked statistics“ page


  • bugfix


  • small error prevented setting the percentage precision to zero


  • added the option to show percentage values instead of absolute reaction count


  • added a global var to deactivate reaction buttons from other code. See the FAQ for more info.


  • another small bugfix regarding the button statistics widget: Strip shortcodes (like image caption) from the excerpt.


  • small bugfix regarding the button statistics widget: If no button was given, it didn’t show any buttons at all instead of all. Thanks max_Q for the fix.


  • had to bump the required version of wordpress to 3.3 because of the new button statistics widgets features.


  • new features in the button statistics widget (and shortcode):
    • option show an excerpt of the post
    • option to only display selected buttons
  • Added donate link in the wordpress plugin directory


  • added a feature to let users vote multiple times
  • added a „reaction summary“ as option and shortcode: Engage with your users by including the most clicked button in a summary, e.g. „Most people found this post interesting!“ while „interesting“ is the most clicked button.


  • changed cookie handling
  • added support for deleting the page cache after clicking a button
  • supported cache plugin: W3 Total Cache


  • very small java script change

  • Well, it’s 11.11, so this is the Kölle Alaaf release! 🙂
  • No just kidding, just found a small error in the previous release with the HTML-tagline, fixed now.


  • small update, added the possibility to use HTML in the buttons taqline


  • added reaction_buttons_click_count($post_id) to include number of reactions per post in own themes. Returns the accumulated number of clicks of the specified post.
  • added the possibility to only allow only one vote per post. (Thanks Vlad for most of the code!)
  • added the option to show a javascript popup if you try to vote twice. (Thanks Vlad for the idea and most of the code!)
  • added the option to show the results only after the user voted.


  • small changes for 3.0
  • tested with 3.0rc3

  • added code for a second widget and statistics page: Show the top x posts with the most overall clicks.

  • added code for a statistics page in the backend from Fábio Silva


  • added a shortcode for the widget (show top x posts…)


  • added the possibility to deactivate reaction buttons based on categories.


  • fixed a small error that prevented the ajax update in buttons with more than one whitespace.


  • removed the possibility to multi vote by clicking really fast (before the ajax response came in)


  • added the shortcode [reaction_buttons] (can be activated in the config)
  • added the possibility to add the buttons after the post, above the post, via shortcode and directly in your theme by using a php function. Got the idea for those options from TYCB, thanks! 🙂
  • fixed a small settings error

  • fixed a bug in the widget, sorting was screwed


  • bugfixes and cleanup on the widget
  • small cleanups in the settings

0.9.3 (beta)

  • added a widget, that shows the posts with the most clicks for each button.


  • Added the possibility to activate cookies in the backend, so that you can only vote once on that browser. (Anyone with malicios intent can circumvent that pretty easily of course…)


  • fixed issues with spaces
  • fixed issues with apostrophs
  • some changes in the settings area


  • First public release.
What do you think of this post?
  • Awesome (308)
  • Interesting (259)
  • Useful (201)
  • Boring (147)
  • Sucks (155)

166 Antworten auf „Reaction Buttons“

Reaction Buttons is a great little app. Seems to work and is very simple to set up. I will be trying it on my blog to see whether and how my visitors are going to use it.It would actually be useful if I could specify by individual post whether to use Reaction Buttons or not and I would really like to be able to change the highlight colour to fit in with my colour scheme.

Thanks for the feedback! 🙂 Strange, don’t have that in my test or live blogs. I’ll try to find out where it comes from.

@Wolf: I just released a new version 0.9.1, which should work with spaces and apostrophes in button names. (It should be online in a couple of minutes) Sadly I couldn’t reproduce your problem, but perhaps it will help .My plugin uses two hooks to get printed out, the hook for the article and for the excerpt. I cannot figure out why it would be called in your header (it’s not even in the body on your page). I only have one header hook and thats for the javascript, which is inserted correctly in your blog.

You have a little bug here: On your site and my test site the following is observed. I can vote more than once and I can also click each button in turn and create a new vote. You need to change the cookie function, I think …

I didn’t think that would be neccessary, but you are right, the simple check with a cookie would be nice. I’ll implement it in a later version.

As for the images, I’m a bit unsure what you mean. You should be able to do everything by editing the CSS (or better: Disabling the CSS from the plugin in the settings and using your own.)

Thanks Jakob  for your comments. The cookie would just make it ideal. Ok, I mean like icons that you can click instead of the boxes. But, yes, I now see, it’s all in the CSS anyway.Looking forward to the next release. These plugins are so useful for user interaction.

Just wanted to say thank you for this plugin and I am waiting for the widget edition, because that way I will be able to place it right besides my comics. I would also recommend the option of disabling individual post and just using the „widget only“ version.Thanks

ATM the widget is only supposed to show what posts get the most clicks on button 1 through n. (Actually the code in svn already does that, but I have to find time and figure out how to make the widget configurable.)

You would like to have a widget for the vote option? So that you can click on the buttons in the sidebar? But how should the widget know for which post that should count? I mean you can show more that one post on a page.

My comics are tied to the post. Is there a way I can introduce (via php) the button code anywhere within the post. Similar to what we have for other mods where you can just type in <–My Buttons –> within the post and the wordpress just posts the code over there… just a thought.

A great feature would be the ability to make the reactions different for posts, author pages, etc.Example: For posts, let’s say you want the reaction buttons you have set up right here on your post. Then for authors, let’s say you want „What do you think of this author/author’s name?“ And then the admin can make buttons like Good Writer, Funny Person, etc.

Nice plugin, I can see some use for this one. Like some people above me I’d like to see a more configurable edition. Like using a shortcode, something like [reaction]. It would be great if you could configure it in the shortcode itself, giving the options which people can choose from. something like [reaction title=“What did you think of this movie?“ option1=“Great“ option2=“Average“ option 3=“Bad“]. But that might get complicated 🙂

Sorry for my late answer, been busy otherwise. :/

I’m currently a bit short on time, but the shortcode is on top of my list. But perhaps you can try to clarify the idea a bit for me: Do you want to be able to include [reaction_buttons] somewhere in your theme to being able to include it in a different position? Or do you guys want something like described in the wordpress shortcode documentation, i.e. that you could include in specific posts only? You can already deactivate Reaction Buttons in every post… Or is this about the position of reaction buttons?

Your second idea sounds like a vote plugin. 🙂 I don’t see much use for it in my concept, it wouldn’t fit very well in my data structure and I bet there are a lot of vote plugins out there already. I don’t think that I will be able to include it.

But thank you all for your feedback, love it! 🙂

Re #22

Yeah, I’d like a shortcode to put it anywhere in a post where I want to. It’s a funnier version of a vote plugin 🙂
But the whole option thing in the shortcode isn’t necessary of course, just a shortcode would do 🙂

All right, shortcode support is done. I’ve uploaded it, but didn’t marked it as stable yet. It runs great on two of my blogs, but I’ll test them a bit more next weekend. If you want to try the new version, 0.9.5 already is available at under „other versions„. (Download 0.9.5, not the current stable version

This is a great plugin, but unfortunately, I had to disable it. It appears that if your host has a firewall installed to protect their clients, this plugin interacts with it in a way that it will ban people from being able to access the entire site. The error I was show by my host was this:ModSecurity:
Access denied with code 406 (phase 2). Pattern match
„/usr/local/apache/conf/modsec2.user.conf“] [line „117“] [id „950004“]
[msg „Cross-site Scripting (XSS) Attack“] [data „.cookie“] [severity
„CRITICAL“] [tag „WEB_ATTACK/XSS“] [hostname „„]
[uri „/wp-content/plugins/reaction-buttons/jquery.cookie.js“]
[unique_id „S6kcfkgJ-hoAAB98CRAAAAAs“]If I’m reading this correctly, it seems that the problem happens if you enable the cookie setting.

Happy that you like it Giovanni.

As for the problem with ModSecurity problem: Thank you very much for telling me that. For the moment I don’t see what damage someone could do with my script besides in the worst case mess with the counts. (But cookies weren’t a secure solution anyways and there is none, since we don’t want people to log in…)

But I’ll try to see were the error is coming from and will try to fix it, perhaps I really missed something important.

I’m sorry, missed your comment. No, I hadn’t had any time to work on that.

But again, I don’t think there is any security risk since I don’t work with anything security related, it is just that some generic mod_security rule picked something up.

This plug is similar to what i want for a plugin for showing Multiple Choice Questions.Each button will represent a choice,and the click count will be recorded.Still I want some modification to this:the click count should only be shown after the botton was clicked,also the correct choice was shown,and the click count was changed to percent.So would you like make another plugin for showing Multiple Choice Questions?That’s would be a great pluginhere is some examples of MCQs,

Yeah, I’m not worried about the security. It’s just that I can’t access my entire site when that happens. However, when I turn off the cookie option, the problem goes away. I’ll just keep it that way for now. =)

Thanks for bearing with me here Sha, I think I found the problem, which seems to be quite simple: mod_security seems to have a problem with the filename of the javascript library jquery.cookie.js. (Source.) Strange rule I guess, but easily fixed. I’ll rename the javascript file and push a new dev release in a couple of minutes.

@wew: Thanks for your suggestion, but I simply don’t have time to develop plugins I don’t want to use. (I barely have time to cope with all the feature requests and problems for the stuff I use myself. :)) Perhaps I should do that for hire, but since I don’t think you want to pay me, I sadly cannot help you. But the plugin is licensed under the GPL, if you like you can modifiy it yourself or find someone else to do it. 🙂

Hi there,Thanks for this plug in.Is there a way to disable it on pages? (I like it on posts, but not pages)Also, is there a way to link it into a popularity contest? (I.e. the top most „funny“ rated blogs can be showed in a widget on the right column). I realize this is probably a tall order, but no harm in asking if it’s possible, right?

Both things are already implemented: You can (de)activate Reaction Buttons for the front page, pages, individual blog posts, category archives, tag listings, date based archives, author archives and search results. And you can deactivate them also for individual posts/pages.

As for the widget: There is a widget that shows the top x entries for each button. Not sure if its that what you are looking for. If not, maybe I can modify it (some time in the future :))

Oh and if you guys like my addon, I really wouldn’t mind some (5 star :)) votes! I got some when releasing the first version but nothing after that…

We really like the reaction buttons and love the fact we can name them ourselves. However the number doesn’t change immediately to show their vote when people click the button. We think people are getting confused that it doesn’t work and are clicking it several times. The vote only shows if we go out of the blog and go back in again. Is there something we need to do for their vote to show up immediately? Thanks again for the plugin!

I seem to have found the problem: The spaces. Your button labeled funny works as expected (sorry, didn’t read the article, only clicked around ;-)), but the other one with spaces in it doesn’t.

I’m fairly sure I tested it with spaces, but I will try again later, since my blogs don’t use spaces in their buttons. But you are using the latest version (0.9.6) of the plugin?

I am using v0.9.6. I just installed the plugin on Friday. I see what you mean about the „funny“one working. I’ll go back and change the others to one-word buttons. And good heavens, I certainly don’t expect you to read a quilting blog, for heaven’s sake LOL!! It might put you to sleep.


But don’t change them just yet, I’ll try and fix the problem, I want others to be able to uses spaces. I’m quite sure I’ve tested it, perhaps I broke it with a change. I’ll make sure to have spaces in a button on my test blog for the next time. 🙂

Well, found the problem: The javascript function only replaced the first whitespace and I never tried with more than one. I changed the function and it should work with all your buttons.

0.9.7 should be on the wordpress page shortly and fix your problem.

BTW: Cool generations thing you got going there, I can understand that you are excited about it. 🙂

Thank you for the update!! It’s working now. I did have to change the last button though. Apparently it doesn’t work when there is an „!“ in the button. That’s okay. I took out the ! and it works just fine. This is a great plug-in, and we appreciate everything you’ve done to make it work correctly for us.  You’re really fast! BTW – I’m adding my 5 stars to your plugin.

You are welcome. Thanks for the 5 star rating, it seems to be quite the criterion while looking for a new plugin.

As for the exclamation mark: Yeah, I’ve got a problem with the javascript there and I’m still unsure how to solve it. Maybe I’ll try some other time. 🙂

I’m not sure what you mean, you already have all you need to add images by means of CSS. I don’t want to add this feature into the configuration screen since it would get unnecessary complicated.

But as you already did, you can add to your CSS a background-image and a padding-right to each button class. Every button gets a class namend „reaction_button_$NAME_count“ which you can easily match then.

But thanks for your input! 🙂

yes, thank your. But, as you said, the class name is “reaction_button_$NAME_count”, when I use chinese characters as the $NAME value, i can not modified the css directly because chinese characters can not be used in css, i should hack your file( the reaction_buttons_html function) to add a new class.

All right, I see the problem. Funny enough it seems to work (even the javascript) with the chinese characters. But I guess it would break compliance with the standard to use them… Since I don’t have id’s for each post, I sadly don’t know no solution to the problem. 🙁

But if you hack something that works for everyone, please let me know.

Thanks for your contribution. 🙂
Your code has a little flaw: It sorts the posts by a string value, you need to cast it to an integer or something like that. Had the same problem with my widget. 🙂

But since there is no need to code the same function two times, I extracted the function from my widget and used it for the shortcode if you need it.

Version 0.9.9 should be online shortly and adds the shortcode [reaction_buttons_most_clicks limit_posts=3]


I saw you cast() the string to output as unsigned. I just wanted my buttons to be sorted alphabetically. 🙂

I will take a look at your next realease.

Nice work.

Now I understood why you cast() in first time.
Seems way better than the logic I coded in that file.

Didnt know about extract(shortcode_atts(array(), atts)). That is nice. It isn’t that obvious at first glance, but it saves some lines of code. 🙂


I was talking with a co-worker about a „statistic“ page. Some kind of feedback to the admin about how many posts are „awesome“ (and which ones); how many „sucks“ and so on.

If I have time, I will work on that this afternoon. I will post here if I get something done.

Hi Jakob.

I just finished the changes.
Well, I never worked with a diff or cvs / svn of any kind. I used winmerge to generate a patch file. Is that what you want?

Here is:

Feel free to make your changes. 🙂
The stats page is simple. There is a link inside the Reaction Buttons settings page.

I also added pagination there. I tested a few times here and found no bug. Same with the shortcode. Didn’t test with the widget.


Thanks, looks good! 🙂

The pagination had a little bug there (could only be tested with more posts than buttons :)), it was around line 729 (in the new uploaded source), which I fixed. But the rest seems fine. Thanks for the contribution, you should be able to see it online in a few minutes (though not yet marked stable, you need to download it manually from other versions).

Oh, and about the diff: Since unix and win have different newline symbols the diff didn’t work out. Manually integrating works too. 🙂

Oh, Hi. 🙂

I am at home right now (will look line 729) when I get back to office.

I remember changed the settings of winmerge.
„In WinMerge go to Edit > Options… > Editor > Check Preserve original EOL characters“

I did that 🙁

I will try UnixUtils next time. 🙂

I’m not sure why it didn’t work, but as long as you only add functionality to the plugin it should be always easy to merge this, especially if you tell me from which version you started modifying.

Lol, my bad.

COUNT() returns the maxRecords. I just didn’t get that when I first tried what you did. I was gettting the last value of _reaction_buttons_@button (where @button was the last query inside the buttons‘ loop).

That was strange. What worked (as you said, with few posts) was that sum (+=) of the returned data to maxRecords. :S

I even tried the wpdb->query() because I thought the problem was with the way wpdb->get_results() work.

Love the concept of the reactions. If your short of idea’s/suggestions if have some that, in my opinion would make it the killer app!

– ability for a list style display
– add tabs to the widget – so tab 1 displays reaction 1, tab 2 displays reaction 2 etc. This
would be a huge space saver.
– add more options to the widget. E.g. most popular of the day/week/month and perhaps a ‚more‘ link to an archive that show all in a paginated fashion.

The post popular by day option would be something I could really use!

Found a small bugsy; enabling cookies seem to break to ability to vote.

Thanks for the plugin!


– ability for a list style display

I will keep it in mind, perhaps I’ll make it configurable or entirely as a list, which can be switched between horizontal or vertical mode.


– add tabs to the widget – so tab 1 displays reaction 1, tab 2 displays reaction 2 etc. This
would be a huge space saver.

But is there enough space for the tabs? I’ve seen some blogs with looong button names. 🙂


– add more options to the widget. E.g. most popular of the day/week/month and perhaps a ‘more’ link to an archive that show all in a paginated fashion.

Sorry, not possible due to database restrictions. It would mean to change everything to a dedicated database table and I don’t want that at the moment. Feel free to fork your version with that functionality though, it is open source after all. 🙂 I’m sure its a useful feature, but I want to keep it simple.


Found a small bugsy; enabling cookies seem to break to ability to vote.

Could you specify that? Best in a new topic in the reaction buttons part of the wordpress forums? I can’t see that there is anything wrong with voting with cookies (like in my blogs for example…) Do you have javascript deactivated?

„Found a small bugsy; enabling cookies seem to break to ability to vote.“

Maybe he is talking about the ability to vote many times by just refreshing the page.


As long as cookies are enabled (in the plugin and the browser), you shouldn’t be able to vote twice. If that happens there is a bug or a config error. But without more information I can’t do anything about it.

Thanks much for this plugin! I’m looking forward to seeing how it goes over on my (rather new) blog. The only thing that would make it better would be if it gave voters some feedback that their vote had been counted. For instance, the counter would increase without a page refresh, or perhaps just whichever button had been clicked would stay filled in with the background color to let voters know that they’d chosen that option.

It should and does refresh without reload, for example on this page. You need of course javascript enabled for this.

As for color changes, you can simply edit/add css: After a button was clicked, it gets the voted class assigned.

If you like the addon, please vote for it on the wordpress page. 🙂

Odd, when I was testing it at home, it didn’t increase the counter (on your site or mine), though I have JS enabled. Testing it at work this morning it works fine. Will have to look into my browser settings more deeply.

*shrug* Oh well! Thanks for the info about the new class being assigned. 🙂

Will totally give it a vote when I get home (can’t remember my login info right now…). Thanks again!

john xiao:


I’m happy if that code works for you, but I’m sorry that I cannot include it: You are generating non unique id attributes, which isn’t allowed even though most browsers still work with it. Since I don’t have an id field for every post+button combination there is sadly no way I can include something like this without making the html invalid.


Love the buttons! However, I only need three vote buttons. But I can click on all three. I can vote Yes, No, and Maybe. Any option to allow a user to click on just one button and that’s it?


It isn’t possible at the moment, but I’ll put it on my TODO list, maybe I’ll implement it in one of the next versions.

Hello there… first… that’s a great plugin! thanks a lot for your work…

My doubt is… Is there any implementation to show the same information that we can see at „Reaction Buttons Button Statistics“ Admin Page, on the blog’s page, for the visitors? like… every ‚reaction‘ will have a link that’ll lead to a page showing a DESC list of the reaction choose by the visitor.

Thanks for your time!

Ok… I’ve already done that… I’ve made a simple modification to ‚reaction_buttons_get_top_button_posts‘ function… added a new variable that is the reaction I want to list…

Is there’s already a way to do this using your plugin? Or my modification was necessary?

Hai Jakob.

jQuery.cookie() isn’t working. It is preventing the update of buttons‘ count.

Firebug logged „jQuery.cookie isn’t a function“.

Firefox 3.6.7

Yes, it is.

A post from the blog:

You will see your reactions at the bottom.
I can’t uncomment the jQuery.cookie. If I do that, the vote’s count won’t update.

If you really want to see that, we need to be online at the same time, then I log in uncomment in the code. My msn is on mail field.


I only have jabber, icq and skype… Do you have an account of those? (A gmail account is a jabber account for example…)

Could it be that there is some javascript battling itself? You seem to have several versions of jquery running, perhaps it would be enough to have only one jquery library loaded…

But I love what you did with the plugin, great job on the looks and integration into the design. 🙂

My gmail is on the mail field. I’ve used it here since my first comment 😛

I saw that more than one jquery was running. Someone changed the header to include the script tag instead of the wp_enqueue_script(). I will check that.

But, as I remember, when I got a call from my last boss (im at a new job), there was only one jquery. I am sure about that.

Well, thanks. The idea to use the plugin that way came from the client and was tunned by my last boss.

Call me at gmail when you get at your home.

I’m not at home the rest of the evening, will try to catch you tomorrow during the day.

I work from 9 am to 7pm. If you are in Berlim, we have a 5h difference. Here is 14:32 pm now. There is 19:32 (night, right?). That’s what google says. 🙂

19:32 is correct, I’ll try to continue the rest via mail instead of those tedious blog comments. 🙂

I wanted to know if someone could take a quick look at my site . Ever since I’ve installed the reaction buttons, I’ve been getting a webpage error in IE8 as the browser.

The webpage details are:

Message: Object required
Line: 53
Char: 3
Code: 0

I think this particular code is the problem:


I pasted the source code into notepad ++ which is an enhanced version of the one which comes with Windows. I checked carefully and i know it was the reaction buttons causing the issue, voting buttons. The line of the error supplied pointed directly to the reaction buttons.


Hi, this is a great plugin but I want to choose the place to display the buttons.
The setting page says :
You can also set the reaction buttons manually in your theme, by calling the function reaction_buttons_html()
Nice but what is the code to insert to call this function ?


don’t work.


It appears the plugin is no longer working since upgrading to v.1.0. I can’t seem to figure out why? I’m running wp 3.0 stable. I’ve tried uninstalling and deleting then doing a clean install but alas still no luck?

Generally it is working. Must be a conflict with another addon or something like that.

Are reaction buttons currently active on your linked site?



– ability for a list style display

I will keep it in mind, perhaps I’ll make it configurable or entirely as a list, which can be switched between horizontal or vertical mode.

I tried it today and I won’t add a list stlye. It gets easily messed up by different themes.

Hi, Yes, they are active and showing up on my posts but are not working when you click on the reaction button. I am currently trying to disable each plugin to see which one may be posing the conflict. If I find it I shall surely let you know, Thanks.

Hi, great plug-in. I will definitly use it instead of comments as comments normally gets out of hand after a while. With this plug-in you are still able to get some feed-back from your visitors. But, found a problem with the naming of the buttons. I want to use Swedish and just as with Chines above (in a previous comment) this do not work well in all cases. The do work to set a reaction and the counters works but it is the css that is fooled. Some ideas to solve this:
#1 filter the button name to URL-valid characters,
#2 a nick-name for the button to be used in css etc.

But once again, thanks for a very nice and useful plug-in. Will try to present the result of highest values etc in the side-bar, only just now realized it should be possible.

If you want to add support for this, you are welcome to do so and I’ll try to integrate it before the next release. But the next release will be earliest sometime in 2011, I just don’t have time for this plugin atm.

Thanks for the plugin. Just one „big“ request. I have looked through the previous comments to see if my request has been addressed and don’t see it (maybe I’ve missed it). The „look“ and „font“ of the „Reaction“ widget on the sidebar of my site. How do I get the widget to „take on“ the „font“ and other „theme settings“ of my web site? The „font“ of this „reaction“ widget just sticks out (and not in a good way) and makes me want to disable is as it looks so awkward. If tried to mess around with the settings for the css, but it looks like it’s past my abilitity to mess with the code. Any suggestions? Thanks!

Your theme has special settings for your addons as far as I can see. Instead of applying all settings to the widget class, your theme uses a special suf-widget class. You can copy these settings into the reaction buttons styles (and remove my font-size setting):

color: #444444;
font: bold 100%/100% Arial,Helvetica,sans-serif;


How about displaying an image above or below the buttons, based on which button has got the maximum hits. For instance, I show 3 buttons – Good, Okay and Bad – if ‚Good‘ was voted the maximum, a smiley image will be displayed or if ‚Bad‘ had got the max votes a ’sad‘ icon will be displayed. Images for the specific buttons shall be controlled by the user. Can you please throw me some advise on this. Or if you or others in this board can do a customization for me, please send me a quote or contact Thanks.

I’m sorry, but I don’t think this will be implemented, at least by me. If you feel like integrating it, you are welcome to do that.

I guess you could do a redirect with javascript. I had the feature request to be able to add own javascript to the buttons before. Perhaps I’ll implement it in the future. For now you would have to edit the javascript code in the reaction buttons source code itself.

Hallo. Große Plugin! Auf meiner Website 2 Fragen entstanden.
1. Ich brauche, um Stimmen für den Posten erscheinen auf den Startknopf und ohne Klammern zu bekommen. Wie kann dies geschehen?
2. Ist es möglich, dass nach dem Drücken der Inschrift auf sie hat sich verändert, und die Anzahl der Stimmen zu tun?
Danke. Ich werde Ihnen sehr dankbar, und spenden einen bestimmten Betrag

I’m sorry, I cannot understand your questions. Please ask them again in english. But I’m afraid if those are feature requests, I simply don’t have time for them atm…

No, you cannot atm. The change in the code for the first feature isn’t that much and should be no problem for anyone that has ever used PHP. I still don’t understand the second feature. Do you want to change the appearance? There is a ‚voted‘ css class that might help you with that.

Hi there – great plugin! love it! We are using on a site but wanted to change the text that we had initially set up as reactions. And so when I changed it to a simple like, dislike instead of what we originally had all the votes are gone until I change it back to the original text … is there anyway to just change the text of the 2 options without losing the votes?

I’m sorry, forgot about your comment 🙁

Well, there is a „manual“ option if you have some access to your database. You can run the following SQL query in your wordpress database:

update wp_postmeta set meta_key=“_reaction_buttons_NewName“ where meta_key = „_reaction_buttons_OldName“

The rename your button in the admin interface and your votes should be there. Maybe I’ll add it in the future directly as a backend function.


Thank you for the plugin – it’s great!

But I have a little problem – I can’t edit the css of your widget in the sidebar. As far as I understand it must be done in these lines:

#sidebar div.widget_reaction_buttons h3 {
margin: 0;
margin-top: 4px;
font-size: 1.1em;

#sidebar div.widget_reaction_buttons ol {
margin-left: 25px;

Right? But nothing changes when I edit them. (For example, I want to make the fonts smaller).

My site is here –
The widget starts with the words – Оценка зрителей

I cannot find the reaction buttons stylesheet in your page, so I think you edited the right file, but didn’t include it in your template. Reaction buttons has an option („Use CSS“) in its settings that include the stylesheet.

HTH, Jakob

Look at this post for instance –

The buttons are just under the picture. They are in Russian and sound like „Браво“ „Мерси“ „Ха-ха“ and so on. As you can see I edited them and added some decoration.

But! I ask you about editing not the buttons but the widget of your plugin. It’s in the left sidebar. I can’t change the font size for example.

Sure, I understand you. Please reread my comment, you didn’t *activate* the CSS, therefore changing it doesn’t change anything! Either copy the content (or the part you need) of reaction-buttons.css into your own stylesheet and edit it there (recommended!) or include the CSS file in the reaction buttons options and edit that file. (Not recommended, since you loose your changes on an update.)

Thx, very good plugin, can u make an option (in a future version) for only registered users can vote?

And if is it posible with the votes from registered user, if the user vote another time change the previous vote overwriting new vote (like rating on IMDb), i think this method is very good to keep real results, and your plugin can be used for a serious customizable rating, poll, apart of reaction.

Sorry for my bad english, regards.

I said because i tried many plugins of rating and polls and most are too extensive with features that are useless, with yours would have been a very nice option (simple, elegant and fully configurable)… But you are the boss :), thanks for the answer!

Sure, thanks for the idea. The problem is that the plugin uses the post meta data and not its own database table. That makes it really simple, but also limits it in its expansion possibilities…


Great plugin! I was thinking of registering who clicked on what. Do you think you will implement this in future versions? Or should I have a go at it myself? Buzzfeed has a great little feature in addition to its reaction buttons … ex: belindam thinks UC Davis Pepper Spray LEGO Set is LOL a few minutes ago. I would love something like this.


Sorry, thats out of scope for this plugin. It was designed as quick and simple solution without its own database tables and therefore it would be hard to gather those information. In addition: Do you have so many logged users on your blog?

Hello again 🙂

I just noticed something weird. Votes are not updating, they only show after a refresh. I am using |?php echo do_shortcode(‚[reaction_buttons]‘); ?| to include the reaction buttons in my template. If the Use cookies to make it harder to vote twice? option is not checked unregistered users can vote multiple times. If I check it, it works fine, the votes still show up after I refresh the page, and if I clear my cookies it lets me vote more than once. I really like your plugin and want to use it. Can you please help me fix these little problems?

Thank you!

Sry for all the comments, but i changed the template code to |?php echo reaction_buttons_html(); ?|, and checked the cookie option. Users aren’t able to vote more than once, but the vote is still visible after refresh and if cookies are cleared, a user can place another vote.

Two thinks: If the votes aren’t updated at once, you most probably have a javascript problem. I’ll try to check if I find anything if you send me a link to your site.

Second: The option is intentionally „Use cookies to make it harder to vote twice“. It is only against unintentionally clicking twice or against computer beginners. To make it secure you would need to have everyone to login and my reaction buttons are intended for easy no fuss feedback.


Thank you for replying. There is a link to the site that is using the buttons in my first comment. Just click on my name. If you can take a look, it would be great. There is one thing I haven’t checked. I think that when I didn’t use the |?php echo reaction_buttons_html(); ?| it was working just fine. Would that make a difference?

A question for you … Can a user’s ip be logged after he/she votes? I think I saw you say that the plugin doesn’t use any tables.

Thanks for you time man!

There is no reason why the functionality would change if you include the buttons in a different way. But maybe you activated other plugins during that time? What I could find out about your site that it has a shitload of javascript. I suspect that the different versions of jQuery cause the problems.

If you want to log the IP so people can’t vote twice, no, there is no feature of that kind planned. If you are just curious and want to use the data for statistics, I think you could include it into „reaction_buttons_increment_button_php“ if you have basic php understanding. But I’m reluctant to include such a feature since there are a few privacy concerns in a lot of countries (including mine) and I don’t think a lot of people would profit from that feature.

What I mean is can we display all posts under each buttons on a page ? for example page „like it“ will have a list of posts where button „like it“ is clicked. page „awesome“ will display all posts where button „awesome“ is clicked.
Can we do that?

I like this plugin, but I think there should be a option, feature…

that allows the admin to choose if guests or users can hit more then 1 button per page or post.

Now anyone can hit all buttons, kinda pointless don’t you think?

It could be abused by hitting all buttons…

The plugin doesn’t distinguish between registered users and guests. (And doesn’t want to, 99% of the blogs don’t have registered readers and no one wants to know what the own editors think)

There are a lot of posts in this thread concerning „security“ of the plugin: I cannot make it reasonable secure (which would be with a login given out by administrators per reacting user and thats unfeasable), I want to make it simple for a user to react. The important part here is „simple“. Sure I could do more than just cookies, I could log IPs and whatnot. But it is *all* circumventable. As long as a user doesn’t maliciously deletes my cookie, we should be good.

Last but not least: There is an option to let the user only click on one of the options (even though with the security „problems“ mentioned above)

Just installed and customized this a few minutes ago…what a great plugin! Thanks for that 🙂

Quick question – is there a way to pull in the total # of reactions from a post and display that elsewhere? I’m thinking on my post excerpts it could just be a line that says „__ reactions“ just like you see over at Pretty Much Amazing (I think they use your plugin). Here’s an example of what I mean…you can see in their excerpts they have # reactions next to the date –

Either way, love your work here!

(sorry if you’ve answered that before…I took a peek through comments but there are so many!)

Yeah, there are a few comments here now… 🙂

Nice reference you found there and yeah, seems like they extended the plugin. Too bad they didn’t send in the code. But well, that seems easy enough. Since you want to integrate that into your template, a php function that takes the post id as parameter and returns the number of clicks would suffice, wouldn’t it? I’ll get on it later today.

OMG, that function already exists. Must have done that for someone already and forgotten about it. 🙂

Please use reaction_buttons_click_count($post_id), should do exactly what you need. 🙂

Hello, I’m gettin this error message as a json response:

error: parsererror
jqXHR: NaN[object Object]
errorThrown: SyntaxError: JSON.parse

What is could be causing this?

Do you have a link to this site? To be honest, I have no idea, but I would poke around a bit. Next step would be to deactivate all plugins, check if it is working now and if so activate them one by one to find the interfering one.

No, I’m not have this link yet, this site is under construction.

I realized that after the error message, the vote is counted because I refresh the page and the vote is shown. Then this problem I believe it could be caused by a compatibility problem with new wordpress version (3.3.1)

Did you have do compatibility test?


First of all, thank you for an amazing plug-in. I have been using reaction buttons long long time now.

Recently, I encoutered a weird problem which I could not solve. I had tried to deactivate other plug-ins but it was of no vail.

The problem is one of the five buttons suddently stopped taking votes. These other four work just fine. Once I renamed this problematic buttons, it worked again. However, all the votes was gone. When I changed the name back, the number of vote were back, but it stopped taking vote again.

I do not know what is wrong. I did tried to look through all the comments. It seems nobody had this problem before. If you can, please help me. Much appreciate.

Generally there is no function to rename buttons, you would need to run a mysql command. But what was the old and new name of the button?

As stated on the addon page, the addon (at least the ajax part) doesn’t work with certain special chars like exclamation marks.

As for the sql statements, you can use this statement as guideline, but you’ll need to find out the name of your postmeta (here wp_postmeta) table. This only works if you have no other button that starts with „Hay“!

UPDATE `wp_postmeta` SET meta_key=“_reaction_buttons_Hay“ WHERE meta_key=“_reaction_buttons_Hay%“

Thanks for the great plugin.

Is it possible to disable the plugin code from loading on certain pages such as; the homepage and contact page?? do you have function which can be used to achieve that??

Great work cant wait for any updates..


From the FAQ:

„I want to deactivate reaction buttons in certain situations

Next to the normal options (categories, page types, post options, …) you can set the global variable $reaction_buttons_deactivate to true e.g. in your plugin or certain theme regions to deactivate reaction buttons during the execution of that code. But don’t forget to set it to false again when you are done!“

For me it sounds like something you want to set in the post/page options, but if you want to do that in code, you can set the global variable $reaction_buttons_deactivate to true.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.