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....
For All the users who buy through this page Get an Additional 30% discount for first 50 Early Birds. To avail the Discount use 5F82FE2D as the coupon code. 

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. 



  1. 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.

  2. AC says:


    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??


  3. mamapapa says:

    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

  4. yoevaluo says:


    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?


    • wpfruits says:

      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.


  5. Damian says:

    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…

  6. damian says:

    have also tried it within single.php and index.php …completely breaks the website if adding it in single.php

  7. Damian says:

    Ahh! thank you, i was putting it in the wrong spot, and the author helped a lot…thanks!

  8. Jeton says:

    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!

  9. Jeton says:

    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’ “);

  10. Schmido says:

    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.

  11. Aswin says:


    I have problem as Damian. The code breaks when inserted. Can you help me with the exact spot, where it should be inserted.

  12. Shoe1432 says:

    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?:

    I don’t see any kind of loop in this php.

  13. Leo says:

    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.

  14. Sunday says:

    Thanks for the plugin. Really great!
    Whether probably to add vidget for show most often marked?

  15. Jeton says:

    @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.

  16. Wasim6645 says:

    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.!

  17. JayEye says:

    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.

  18. damian says:

    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

  19. TruXter says:

    Anyone else notice that the comments here, do not use the like/dislike buttons?

  20. tomas says:

    thanks for the plugin but can you please give us a full code to be embed in the theme?

  21. sunbbon says:

    Can I get the Most Liked Posts with query_posts function?

  22. shaun says:

    hi, 5F82FE2D is Coupon expired.TK

  23. Hirurrg says:

    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:)

  24. Hirurrg says:

    And one more, can I display results of like/dislike in exerpt in blog page for reader would know rating of post?

  25. Chris says:

    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:

    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”).”)”;


    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?

  26. Chris says:

    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/ on line 169

    On another note, the support ticketing system on doesn’t work.


  27. Torinoko says:

    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 🙂

  28. Anshuman says:


    To start with, I’m not so good at JavaScript but I was successful in adding the Like and Dislike buttons without breaking the comment structure. But I want help regarding its positioning. I want the buttons to be placed next to each other and inside the comment’s box, not below it. Please visit my website and have a look:

  29. Iftekhar says:

    Hi, nice plugin. Really helpful. I just want to alert u to correct the code:

    Please remove the spaces from php start and end tag, or readers may get confused.

  30. suzan says:

    works fine !
    but the likes/dislike button every where in wordpress ! i want the like dislike button only single.php can you help me sir ?

  31. Rourke says:

    For some reason the Like/Dislike buttons stopped working on my site. Any ideas why this would happen? I purchased from you. Thanks

  32. Nouman Rifat says:

    I used your plugin and it was very helpful. I can see that within wordpress post loop, when we call this function, it automatically gets the post id and shows its likes and dislikes. But in my case, I have manually fetched posts Comments, so how could I use this function in manual comment call? I mean is there any way that I will send the comment ID with this function so it will get its likes and dislikes ?
    Thank you in advance.

    • nishant says:

      Hi Nouman Rifat,

      Thank you for contacting us.
      Actually, currently we don’t have any function that can help you to fulfill your requirement.
      But we’ll try to write an function for this in near future.


  33. Androidcob says:


    I tried everything what i can, but i am unable to find out the way to put your code on this theme (as below). That’s way i put the singel.php code here. Can you help me to resolve this?


    theme code:


  34. I have installed this wonderful plugin. Thank you so very much. It is working, but there is a problem in that you can like more than once.

    I read above that I have to add the php to the loop for the comments. I want to know WHICH index.php? The main index.php in the root folder or in the index.php in Wp-content folder? thank you for your help

    • nishant says:

      Hi Sharon Jackson,

      Yes, In Like dislike lite version user can like more than once with different browsers because lite version have only one Cookie functionality.
      But, if you want that user can like only one time , you can go with Like Dislike plugin PRO version.
      In PRO version admin can set vote tacking ( Cookie or IP address).
      You can have a look over the plugin PRO version using given link :

      Hope it would be helpful to you.
      Please let us know if you need further assistance.


  35. Thank you, Nishant. I will let my customer know. If he wants to buy it, I will be back!

  36. Florie says:


    My company is looking to buy and install the pro version of this plugin on our website. I have one question though, is it possible to disable the dislike button? if yes, how can I do it?


    • Tiks says:


      Yes,it is possible.
      Plugin already have option for this. You can enable/disable like/dislike buttons from plugin admin panel.

      Please let us know if you have any other query.


Leave a Reply

(it will not be shared)

LiveZilla Live Help