WordPress文章/页面/评论添加喜欢/不喜欢投票功能

之前分享过 Ludou Simple Vote 、 DiggWTI Like Post 这三款文章喜欢/不喜欢投票插件,今天再简单介绍几个类似的插件。

Post Like Dislike

一个很简单的文章顶踩插件,支持设置显示位置和是否需要注册才能投票

post-like-dislike-wpdaxue_com

Zaki Like Dislike Comments

这是一个专门对评论喜欢或不喜欢的投票插件,有合并模式(显示支持和反对最终的票数和)、分开模式(分别显示支持和反对的票数),默认可以选择在评论内容的前面插入。你也可以自己使用插件提供的PHP代码插入。

zaki-like-dislike-wpdaxue_com

Like Dislike Counter

这个一个支持文章、页面和评论投票的插件,切确地说,是一个半成品插件,需要你自己修改主题模板才可以使用。之所以推荐,是因为它不仅支持文章和页面投票,还支持评论投票。如果你是一个主题开发者,可以集成到主题。如果你是插件开发者,希望能完善下这个插件。(原作者开发了一个收费版本,就几乎不更新这个免费的了)

like-dislike-counter-wpdaxue_com

如果你要在文章显示,需要添加在文章内容模板(一般为single.php)的循环中添加下面的代码:

<?php if(function_exists('like_counter_p')) { like_counter_p("text for like"); } ?>
<?php if(function_exists('dislike_counter_p')) { dislike_counter_p("text for un-like"); } ?>

如果你要在评论中显示,需要在评论模板文件(一般为comments.php)的循环中添加下面的代码:

<?php if(function_exists('like_counter_c')) { like_counter_c("text for like"); } ?>
<?php if(function_exists('dislike_counter_c')) { dislike_counter_c("text for dislike"); } ?>

关于这类插件,就 介绍到这里,如果你发现其他不错的插件,欢迎告知倡萌。

来源:

https://www.wpdaxue.com/like-dislike-posts-pages-and-comments.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_33204.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?