开发者

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

开发者 https://www.devze.com 2023-02-16 02:41 出处:网络
I need to make page with list of authors who have a most post .. like this: admin (10 posts) johan (9 posts)

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

精彩评论

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