WordPress.org

Ready to get started?Download WordPress

Forums

Top authors list with link to author page - how to? (4 posts)

  1. Os..
    Member
    Posted 6 years ago #

    I am trying to establish a list of top authors by posts that will sit in the sidebar on the author.php page outside of the Loop.

    Ive read this heplping thread where you can define the number of top posters http://wordpress.org/support/topic/61404?replies=8 (check), where I replaced the author_url link with $user->the_author_posts_link - but that doesnt establish correctly towards the distinct authors pages, but to the current displayed page only (author or single page is the same).

    The code Im using is:
    <li><?php echo '<a href="' . $user->the_author_posts_link . '">' . $user->display_name . '</a>'; ?> (<?php echo $user->postcount; ?>) </li>

    Maybe a second loop wrapping this code is missing, but how can I solve this? Plus Id like to add the rss feed link to it as it does in wp_list_authors.

    Anyone with an appropiate idea?

  2. Os..
    Member
    Posted 6 years ago #

    No replies since. Guess the discussion went to other topics ie. page revisions. Well, it would be so cool if...

  3. Ravi
    Member
    Posted 6 years ago #

    i used

    <li><?php echo "<a href='/author/" . $user->user_login . "/" . "'>$user->display_name</a>"; ?> (<?php echo $user->postcount; ?>)<br /></li>

    in WP 2.6 sidebar.php . This works. Try it.

  4. lynettechandler
    Member
    Posted 5 years ago #

    When you say the author's page are you talking about the author archive e.g. http://blog.com/?author=2?

    If so then the List Authors Plus plugin can do this.

Topic Closed

This topic has been closed to new replies.

About this Topic