WordPress.org

Ready to get started?Download WordPress

Forums

Profile Visible without User having posted (5 posts)

  1. artgirlsrock
    Member
    Posted 8 years ago #

    Hi all,

    I have been searching around for an answer to this question: Is it possible to have a user's profile be shown if the user themselves have not posted?

    I'm currently working on a site and need to have all users profiles be visible including those that do or do not post. I am using the latest version of WordPress and have everything else figured out (i.e. custom fields, displaying the page)

    Can anyone help? Thanks in advance.

  2. MichaelH
    Member
    Posted 8 years ago #

    This thread has a way to display all user names.
    http://wordpress.org/support/topic/61404?replies=6#post-327869

    Also take a look at Author_Templates

  3. artgirlsrock
    Member
    Posted 8 years ago #

    That works great minus two points-

    1. They link to their websites entered in the profile vs. their profile page.
    2. I would like it to call their nicknames rather than their usernames.

    The site I am working on is saalumni.com. You'll see I have a title called Registered Alumni which have all the author and link properly to their profiles minus the one person because they have not posted.

    If you could help that would be excellent! Thanks.

  4. artgirlsrock
    Member
    Posted 8 years ago #

    Anyone Help?

  5. MichaelH
    Member
    Posted 8 years ago #

    Well, here's a revised version of what's shown here:
    http://wordpress.org/support/topic/61404?replies=6#post-327869


    <h2>Link list of authors:</h2>
    <ul>
    <?php
    $order = 'user_nicename';
    $user_ids = $wpdb->get_col("SELECT ID FROM $wpdb->users ORDER BY $order"); // query users
    foreach($user_ids as $user_id) : // start authors' profile "loop"
    $user = get_userdata($user_id);
    ?>
    <li><?php echo '<a href="' . get_author_link(0, $user->ID, $user->user_nicename) . '">' . $user->nickname . '</a>'; ?><br /></li>
    <?php
    endforeach; // end of authors' profile 'loop'
    ?>
    </ul>

Topic Closed

This topic has been closed to new replies.

About this Topic