WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Ludou Simple Vote

在WordPress中实现简单的支持/反对投票插件

投票排行

如果你想在侧边栏或博客的其他地方显示投票排行榜,显示一个按投票得分排序的文章标题列表,可以使用以下代码:

<?php
    $hight_voting = $wpdb->get_results("SELECT post_title, ID
        FROM $wpdb->posts,$wpdb->postmeta
        WHERE meta_key = 'ludou_ratings_score'
        AND ID = post_id
        ORDER BY meta_value DESC
        LIMIT 10");
?>
<ul>
    <?php foreach($hight_voting as $vote_post) : ?>
    <li><a href="<?php echo get_permalink( $vote_post->ID ); ?>" title="<?php echo $vote_post->post_title; ?>"><?php echo $vote_post->post_title; ?></a></li>
    <?php endforeach; ?>
</ul>

Requires: 2.7 or higher
Compatible up to: 3.9
Last Updated: 2013-5-11
Downloads: 2,454

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1