WordPress.org

Ready to get started?Download WordPress

Forums

Author Avatars List
[resolved] single user (2 posts)

  1. seozones
    Member
    Posted 2 years ago #

    I've listed out each member but now need to display their avatar for each member. Using this plugin, how can I adjust the following php code to handle that?

    <?php
    foreach (get_users ("role=s2member_level1") as $user)
    {
    $user = new WP_User ($user->ID);
    echo "\n" . "Name: " . get_user_field ("display_name", $user->ID) . "\n" . "Age: " . get_user_field ("age", $user->ID) . "\n" . "About Me: " . get_user_field ("about_me", $user->ID) . "\n";
    }
    ?>

    http://wordpress.org/extend/plugins/author-avatars/

  2. seozones
    Member
    Posted 2 years ago #

    Okay, I figured it out.. It's this:

    <?php
    foreach (get_users ("role=s2member_level1") as $user)
    {
    $user = new WP_User ($user->ID);
    echo "\n" . do_shortcode("[show_avatar id=$user->ID]", $user->ID) . "\n" . "<strong>Name:</strong> " . get_user_field ("display_name", $user->ID) . "\n" . "<strong>Age:</strong> " . get_user_field ("age", $user->ID) . "\n" . "<strong>About Me:</strong> " . get_user_field ("about_me", $user->ID) . "\n";
    }
    ?>

    [Please post code snippets between backticks or use the code button.]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic