开发者 | grosbouff |
---|---|
更新时间 | 2020年1月14日 07:47 |
捐献地址: | 去捐款 |
PHP版本: | 4.1.1 及以上 |
WordPress版本: | 5.3.2 |
版权: | GPL2+ |
Users cannot vote for themselves. If you are the author of a topic or reply, the vote links won’t be available; the score only will be shown.
Yes, you can sort the posts by score or votes count, using the query variable 'bbpvote_sort'. Allowed values are 'score_desc', 'score_asc', 'count_desc', 'count_asc'. Example of a query that will fetch the 5 last topics, ordered by score (desc) : `<?php $best_rated_topics_args = array( 'post_type' => bbp_topic_post_type(), //or 'topic' 'posts_per_page' => 5, 'bbpvote_sort' => 'score_desc' //plugin ); $best_rated_topics = new WP_Query( $best_rated_topics_args ); ?>` See function sort_by_votes() for more details.
The best way to customize the links is to setup some CSS rules in your theme. Check this example on CodePen to see how to have images displayed instead of text. If you need more complex customization, you can filter the links using those hooks :