WordPress.org

Plugin Directory

Comment Popularity

Comment Popularity adds the ability for visitors to vote on comments.

Can anonymous visitors vote on comments?

Yes, you can enable guest voting by adding this snippet to a mu-plugin:

add_filter( 'hmn_cp_allow_guest_voting', '__return_true' );

Please note that it uses cookies and IP addresses to identify a visitor. This is not as reliable as requiring a user to create an account. Cookies can be deleted, and IP addresses can be shared.

Can comment weight be negative?

Yes, you can enable negative weight by adding this snippet to a mu-plugin:

add_filter( 'hmn_cp_allow_negative_comment_weight', '__return_true' );

Can I disable the sorting by comment weight?

Yes, add this snippet to your functions.php file or mu plugin:

add_filter( 'hmn_cp_sort_comments_by_weight', '__return_false' );

Where do I find the plugin settings?

Under Settings > Discussion, and Users > Profile

Advanced Usage

I want to use this with a custom comment template.

First thing - you need to remove the default comments template added by the plugin.

add_action( 'plugins_loaded', function() {
    remove_filter( 'comments_template', array( 'HMN_Comment_Popularity', 'custom_comments_template' ) );
}, 100 );

Secondly, you need to add replace the wp_list_comments call with the following code:

if ( function_exists( 'hmn_cp_the_sorted_comments' ) ) {
    hmn_cp_the_sorted_comments( $args );
} else {
    wp_list_comments();
}

Finally, you need to add the following function to your custom comment template where you would like to output the voting icons.

hmn_cp_the_comment_upvote_form();

To display the comment author karma:

hmn_cp_the_comment_author_karma();

Requires: 3.9 or higher
Compatible up to: 4.2-alpha
Last Updated: 2015-2-15
Active Installs: 200+

Ratings

5 out of 5 stars

Support

0 of 2 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1