WordPress.org

Forums

[closed] how to get author url (3 posts)

  1. zeshan
    Member
    Posted 4 years ago #

    <?php
    function topauthors() {

    $uc=array();

    $blogusers = get_users_of_blog();

    if ($blogusers) {

    foreach ($blogusers as $bloguser) {

    $post_count = get_usernumposts($bloguser->user_id);

    $uc[$bloguser->user_id]=$post_count;

    }

    arsort($uc); //use asort($uc) if ascending by post count is desired

    $maxauthor=10;

    $count=0;

    foreach ($uc as $key => $value) {

    $count++;

    if ($count <= $maxauthor) {

    $user = get_userdata($key);

    $author_posts_url = get_author_posts_url($key);

    $post_count = $value;

    echo ' ' . $user->user_firstname . ' ' . $user->user_lastname .'(RSS) ('. $post_count. ')';

    }

    }

    }

    }

    ?>

    i am using this code for top 10 authors it is working but i didnt get authors url. and i dont wana use plugin so any one kindly help me regarding this.

    my website is http://www.chowrangi.com

    i need top 10 authors by post and there url.

  2. randinicole
    Member
    Posted 4 years ago #

    Please do not make duplicate post, it is not only annoying but bumps other threads down and that is not needed. I am sure someone will come along that can help you with the original thread you posted less than 2 hours ago.

    http://wordpress.org/support/topic/405782?replies=1

  3. Mark / t31os
    Moderator
    Posted 4 years ago #

    Closed, stick to the original thread please.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.