开发者

list the author from data who have the most posts .. wordpress

I need to make page with list of authors who have a most post ..

like this:

admin (10 posts) johan (9 posts) Rob (8 posts) saa (5 posts) ahl (3 posts) newa (1 posts)

I found this

<?php global $wpdb;?>
    <?php $usernames = $wpdb->get_results("SELECT display_name, user_url , user_login FROM $wpdb->users ORDER BY ID DESC LIMIT 5");

        foreach ($usernames as $username) {
          get_userdata($); 
                echo '<li开发者_Python百科><a href="'.$username->user_login.'">'.$username->display_name."</a></li>";
        }
    ?>


<ul>
<?php wp_list_authors('show_fullname=0&orderby=post_count'); ?>
</ul>

See this page: http://codex.wordpress.org/Template_Tags/wp_list_authors

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜