
內容簡介
Just Likes and Dislikes 是優秀的 WordPress 插件 Post Like Dislike 和 Comment Like and Dislike 的分支版本,由 WP Happy Coders 開發。
Just Likes and Dislikes 為文章、頁面和評論啟用了讚和踩圖示。選擇多個預定義的圖示集或使用自己的自定義讚/踩圖標,由您決定。
Just Likes and Dislikes 通過啟用讚和踩按鈕以及計數來增加與 WordPress 的互動。
以下是完整的功能列表:
選擇讚/踩顯示的位置; 在文章/評論前或後。
禁用任何文章類型的讚/踩。
顯示讚、踩或兩者。
選擇要顯示讚/踩的順序。
可定義的懸停文本。
選擇顯示讚/踩計數為零的方法。
選擇限制用戶單個讚/踩的方法;以 cookies、IP、登錄使用者為依據。
提供 7 種可用的預定義圖示模板:
大拇指
愛心
核取/刪除
快樂/悲傷
加號/減號
上/下箭頭
火焰/滅火器
支持自定義讚/踩圖示
圖示顏色選擇器
計數顏色選擇器
在管理畫面中可排序的讚/踩列(可通過選項禁用)
短碼
[just_like_and_dislike id=post_id]
請用文章編號取代 post_id,或移除 id 參數以將文章 id 視為全域 $post 物件的 id。
自定義函數
<?php echo do_shortcode('[just_like_and_dislike id=post_id]');?>
請用文章編號取代 post_id,或移除 id 參數以將文章 id 視為全域 $post 物件的 id。
外掛標籤
開發者團隊
原文外掛簡介
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.
See full features list below:
Select position of like/dislike display; before/after post/comment.
Disable like/dislikes on any post type.
Show likes, dislikes or both.
Choose which order to show likes/dislikes in.
Definable hover text.
Choose to display like/dislike counts of zero.
Choose method to restrict users to a single like/dislike; cookies, IP, logged in users
7 available pre-defined icon templates to choose from:
Thumbs
Hearts
Checked/Cross-out
Happy/Sad
Plus/Minus
Up/Down
Fire/Extinguisher
Custom like/dislike icon support
Icon color selector
Count color selector
NEW: Sortable like/dislike columns in post/page admin screens (can be disabled via option)
NEW: Total like/dislike counts on tags and category admin screens (unsortable due to technical limitations)
NEW: Front end shortcode to generate Top 10 style tables for liked/disliked content (comments not supported at this time).
Shortcode
[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.
Custom Function
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
