Recently working on a wordpress project, my client wanted a like dislike counter on their post and pages and comments. I tried to search wordpress site for one but couldnt fine a simple suitable plugin so we created a simple like Dislike counter plugin for posts, pages and comments.
How To Use the Plugin
Like Unlike Counter for post and comments.
Please upload the plugin to the plugins directory.
This plugin will not automatically added to your theme.
You need to add php lines manually.
Here is the Details for how to use.
For Posts use the code in loop
for like
< ?php if(function_exists('like_counter_p')) { like_counter_p("text for like"); } ? >
For Dislike
< ?php if(function_exists('dislike_counter_p')) { dislike_counter_p("text for un-like"); } ? >
Parameter provide is optional. HTML can also be used as parameter.
For Comments use the code in loop
for like
< ?php if(function_exists('like_counter_c')) { like_counter_c("text for like"); } ? >
For Dislike
< ?php if(function_exists('dislike_counter_c')) { dislike_counter_c("text for dislike"); } ? >
Does not have any backend admin panel.
Thanks for using this plugin.
After so many requests from the users we further worked on the updates for the plugin and here comes to you the pro version for the plugin LDC-Pro. You get the plugin for a very nominal price just for $17.
Click here to see the Features for the Pro Version
- No Code needed – Just install and make settings in the Back-End
- Works for Threads in Comments
- 5 Different awesome Icons to choose from.
- And Many more….
Click here to download the plugin
Please let us know if find any short comings in the plugin.
Please reply with a comment. If you have used this plugin and if you could share the url where you have used it.


Hi Rahul,
I know it's late over there now and I'm in Colorado USA and it's morning here. I can wait on the plugin and the problem I'm having. It's a neat app and I'd really like to use it. As you can see at the WP site I'm using WAMP for my localhost, but when I get the plugins going I upload them to my live site. If you are still trying to figure it out and why it won't work for me, I'll be waiting.
Thank you for all of your help.
Dan
Hi,
Thanks for your plugin. I am trying to make tiw ork however am unsure about this part:
"For Posts use the code in loop
for like
"
Where does this code need to be embedded??
Thanks,
AC
HI AC
Can you please have a look at this thread. I hope this will sort out your issue.
http://wordpress.org/support/topic/plugin-like-dislike-counter-what-do-you-mean?replies=29
Thanks
i installed it - but if i vote a comment, then it doesn't allow me to change the vote (eg. from up to down)..
also strange thing: i have two thumbs up showing
Hi,
Thanks for the plugin. Really great!
I have a question. It looks that the icon for like and dislike is the same (both are thumbs up) Isn´t there any way to make those different?
Thanks
HI Yoevaluo
Please download the latest version I have updated it and made the fix. If you want to do it yourself. Please open the main.php in the plugin folder and edit line number 67 make the up.png to down.png.
Thanks
Completely lost. I tried adding it in many places within comments.php, but just breaks the code. the comments and comment form won't even show no matter where i add it...
have also tried it within single.php and index.php ...completely breaks the website if adding it in single.php
HI
You need to put it inside the loop. Can you please provide me the url so that I can have a look and if possible dummy logins if you can.
Thanks
Ahh! thank you, i was putting it in the wrong spot, and the author helped a lot...thanks!
This plugin is not working. In my case the plugin doesn't work with the latest wordpress 3.4.2 the thumbs appear and when you click numbers dont go up or down. In the database the post_id is missing in the wp_like_dislike_counters table!
Hi Jeton,
This plugin is working fine with the latest version of WordPress(3.4.2).
You can check working example of this @ http://plugins.wpfruits.com/like-dislike/uncategorized/hello-world/
Also we are going to release a new version of this plugin soon.
Thanks,
Tiks
Another thing how can I get the number of likes and dislikes in single_post i tried this for likes but it didnt work.
$like_count = $wpdb->get_var("SELECT ul_value FROM ".$wpdb->prefix."like_dislike_counters WHERE post_id = ".$post_id." AND ul_key ='like' ");
HI
I think that should work may be you are missing something we have got it working on a few projects. LEt me know if you still need it done. Send a mail to wpfruits@gmail.com
Thanks
What do you mean with "in the loop." Into the loop.php? I don't think so. I don't find the position where I have to add the part: "
I only want to have a Like-Button in the comments.
You need to put it in the while loop in your code. If you are not technical I can help you out. send an email to wpfruits@gmail.com
thanks
Hello,
I have problem as Damian. The code breaks when inserted. Can you help me with the exact spot, where it should be inserted.
Hi
If you can send a mail on wpfruits@gmail.com. I Can help you out.
Hey there,
I'm trying to install this plugin but I can't figure out where to put this code:
For Comments use the code in loop
for like
For Dislike
I've looked through everything and can't find any clarification.
Does this go somewhere in here?:
/wp-content/themes/twentyeleven/comments.php
I don't see any kind of loop in this php.
The only sort of loop i found is this:
wp_list_comments( array( 'callback' => 'twentyeleven_comment' ) );
I don't think this plugin works anymore?
Hi
Yes you need to put this code in the comments loop. Depending on what theme you are using the loop can vary.
Thanks
how to make a different icon when the user is clicking.
I mean before the click icon thumb up
and if it is clicked on the icon turned into a ball.
HI
I Am sorry but can you explain what you need done there
Thanks
Thanks for the plugin. Really great!
Whether probably to add vidget for show most often marked?
Hi
Yes we can do that can you please send this request to wpfruits@gmail.com
thanks
@tiks I have modified the plugin to use post_meta and comment_meta tables, added css styling to show butttons and chose text size, i also added a widget that shows most liked posts! Please add me as a contributor to this plugin!
here is the link.
https://github.com/jetonr/like_dislike_pugin_wordpress/
Hi Now we have have pro available have a look at it here with advanced features.
http://www.wpfruits.com/like-dislike-counter-pro
Hey matt, hope you are doing great, I actually need to install this plugin for Comment Rating, but I don't know at all where I've to enter those codes. I am using iTheme2 by Themify, please help me to sort out the matter. I am waiting for your great response. Thanks in advance. Cheers.!
Hi
Can you please get me the url
Thanks
Why doesn't someone just past an example of something that works for them so we can have a look at how it works?
I have the same issue. No idea where the code is meant to sit and no idea what a 'loop' actually is.
the plugin ended up being more or less useless for my purposes as it doesn't include the ability to like / dislike individual replies in the thread... still waiting for you to post the added coded..i realize it's a free plugin, and i'm not downing it...i'm just commenting
HI
Thanks for letting us know. Please wait for one more day. Today we are releasing the pro version of the plugin where you wont need to play with code. Just a few setting in the backend and you are done. Hope you will love it.
Hi Now we have have pro available have a look at it here.
http://www.wpfruits.com/like-dislike-counter-pro/
Anyone else notice that the comments here, do not use the like/dislike buttons?
Hi
Thanks for the notice. By the way that features is available in the pro version which is available here at http://www.wpfruits.com/like-dislike-counter-pro/ also you can get a 30% off if you use the coupon 5F82FE2D.
thanks for the plugin but can you please give us a full code to be embed in the theme?
Hi Tomas,
Try this http://www.wpfruits.com/like-dislike-counter-pro/
Can I get the Most Liked Posts with query_posts function?
HI
Yes you can get that with the pro version of the plugin http://www.wpfruits.com/like-dislike-counter-pro/
hi, 5F82FE2D is Coupon expired.TK
Hi
Yes that has expired. Please use the coupon code 20OFF to get a 20% off
Goodday! Can we assign an order of posts on blogpage in according to their rating - namber of "Like", not only in widget? I hope you undarstand me:)
And one more, can I display results of like/dislike in exerpt in blog page for reader would know rating of post?
Hi all,
I purchased the pro version of the plugin today. I think it's great - a lot of potential there. However, I did run into a couple of issues along the way. Hopefully these changes will be of help to someone.
Initially, nothing happened when I clicked on either the like or dislike button. I noticed the page had the JS error "alter_ul_post_values is not defined" which I traced back to:
js/ldc-frontend.js
This file was a bit messed up. I think its been minified with the comments still in. I replaced it with the ldc-frontend.js from the demo site and the buttons were clickable again.
However, if I refreshed the page, the totals for the comments went back to 0. If I clicked on a thumb up/down button that I knew had received votes e.g. 12 votes, the total jumped from 0 to 12. This also happens on the devs demo site.
I figured out the problem though. Basically when you load the page, its server side generated. Click on up/down and its JQuery. Thats why the correct totals on comments come back after a click.
The cause? There is a mistake on line 39 and 51.
Line 39:
return "".$text."(".$this->get_post_ul_meta($post_id,"c_like").")";
should be:
return "".$text."(".$this->get_post_ul_meta($post_id,"c_like").")";
and
Line 51:
return "".$text."(".$this->get_post_ul_meta($post_id,"c_dislike").")";
should be:
return "".$text."(".$this->get_post_ul_meta($post_id,"c_dislike").")";
Just a small change - the c_like/c_dislike class should be applied to the span, not the button div. These are used to name the table column.
The other, more minor issue is this scenario:
A user places a vote and receives the 'thank you' message. They click again and are told 'already voted'. But if they leave the page and try to vote for something they've already voted for, it will say 'thanks for your vote' rather than 'already voted'. I think my users will forget which they have voted for and wonder why the total isn't going up by 1 when it says 'thank you'.
Not sure how to solve this one! Any thoughts anyone?
HI
Can you please rewrite what it should be seems like you sent the same code at both instances.
Looks like the tags were stripped out. I didn't notice any BB Code to include code blocks?
Anyway, here's the full code for classLDC.php. The changed lines are 39 and 51, simply moving the class name from the button div to the span.
http://pastebin.com/FnaE02FY
Cheers
Chris
Hi,
I've run into another little issue. In the admin settings in the pro version, I've unticked all the checkboxes so that it doesn't auto-embed. However, on one custom page that contains get_the_excerpt(), the plugin is trying to attach itself. I get the notice:
Notice: Undefined index: ldc_page_like in /home/public_html/my.domain.com/wp-content/plugins/wp-like-dislike-counter-pro/ldc-main.php on line 169
On another note, the support ticketing system on sketchthemes.com doesn't work.
Thanks
Chris
Hello wpfruits. I’m playing with the plugin, but the plugin will not work on my page. I cannot click on it. Can you help me? Thanks and greetings from Germany