BACK TO DIRECTORY

CS Likes Counter

by Yaroslav Popov

5.0
(2 ratings)

Counter allows you to count the likes and dislikes.

Counting is carried out using AJAX.

Limitation of cheating over IP (from one IP can vote with 10 minutes intervals).

Usage

Simply place the template single.php function call inside the loop

<?php while(have_post()) : the_post(); ?>
    <?php echo CS_Likes::show_buttons_like(); ?>
<?php endwhile; ?>

Or use ID of post, if function call outside the loop

<?php echo CS_Likes::show_buttons_like($post_id); ?>

To obtain the number of likes, use the function:

<?php $likes_count = CS_Likes::get_post_likes($post_id); ?>

To obtain the number of dislikes, use the function:

<?php $dislikes_count = CS_Likes::get_post_dislikes($post_id); ?>

Plugin Details

Active Installs
80
Total Downloads
6,460
Version
1.0.6
Requires WP
3.9
Requires PHP
Tested Up To
4.7.35
Added
2016-04-06
Last Updated
2018-11-12 3:28pm GMT

Ratings

5
2
4
0
3
0
2
0
1
0