WordPress 顶踩投票插件 Thumbs Rating(支持自定义文章类型)

Thumbs Rating 是一款非常简单实用的文章顶踩投票插件,支持文章、页面以及自定义文章类型。每个人每篇文章只能投票一次(通过HTML5 LocalStorage检测和限制)。

thumbs-rating_wpdaxue_com

该插件默认没有自动在前台加载,你需要修改主题的源代码。

如果你想在文章的底部自动插入投票,可以在主题的 functions.php 文件添加下面的代码:

function thumbs_rating_print($content)
{
    return $content.thumbs_rating_getlink();
}
add_filter('the_content', 'thumbs_rating_print');

如果你想自定义位置,你需要在循环(Loop)中添加相应代码来调用:

<?php if(function_exists('thumbs_rating_getlink')) thumbs_rating_getlink(); ?>

如果你要在文章中列出投票最多的文章,你可以使用下面类似简码:

[thumbs_rating_top type="positive" posts_per_page="10" post_type="post" show_votes="no"]

更多的使用技巧,请查看官方FAQ:https://wordpress.org/plugins/thumbs-rating/faq/

在后台插件安装界面搜索 Thumbs Rating 即可在线安装,或者在这里下载 Thumbs Rating

来源:

https://www.wpdaxue.com/thumbs-rating.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_33120.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?