We'll create fresh WordPress site with Just Likes and Dislikes installed. You have 20 minutes to test the plugin after that site we'll be deleted.
Just Likes and Dislikes is a fork of the excellent Post Like Dislike and Comment Like and Dislike by WP Happy Coders
Just Likes and Dislikes enables like and dislike icons for posts, pages and comments. Choose between multiple predefined icon sets or use your own custom like/dislike icons, the choice is yours.
Just Likes and Dislikes increases the interaction with the WordPress by enabling likes and dislikes buttons along with the count.
[just_like_and_dislike id=post_id] or [jlad id=post_id]
Please replace post_id with the id of the post or remove id parameter for considering the post id as the id of global $post object
[just_like_and_dislike_top_table count=10] or [jlad_top_table count=10]
Options available are:
* count – Number of items to display (default 10).
* show_likes – Display a table with the top liked posts in it (default true).
* show_dislikes – Display a table with the top disliked posts in it (default true).
* types – Post types to display, a comma separated list i.e. “post” or “post, page” (default “post”).
* show_table_title – Display a title for each table in the format of “Likes for Posts”, “Dislikes for Pages”, etc. (default true).
* show_row_numbers – Display row numbers for the table (default true).
eg: [jlad_top_table count=3 types=”post, pages” show_dislikes=false show_table_title=false]
Post Title
👍️
1
Cool post
6
2
Nice post
3
3
[no title]
2
Total
11
Page Title
👎️
1
Cool page
8
2
Nice page
4
3
[no title]
1
Total
13
The table has a css class of jlad_shortcode_table, so you can style it with css, for example:
`
.jlad_shortcode_table thead,
.jlad_shortcode_table tfoot {
background-color: #000077;
color: #FFFFFF;
}
.jlad_shortcode_table tr:nth-child(even) {
background-color: #f2f2f2;
}
.jlad_shortcode_table td:last-child {
text-align: center;
width: 20%;
}
.jlad_shortcode_table tfoot td:first-child {
text-align: right;
}
`
Creates a table with blue background and white text header/footer rows, zebra stripes on the post list, centers the likes/dislikes column and aligns the “Total” in the footer to the right of the column.
<?php echo do_shortcode('[just_like_and_dislike id=post_id]');?>
Please replace post_id with the id of the post or remove id parameter for considering the post id as the id of global $post object