The MU forums have moved to WordPress.org

AHP Sitewide Recent Posts and BuddyPress repeat gravatars (3 posts)

  1. Romik84
    Member
    Posted 13 years ago #

    Hi again,

    I was searching for this issue but haven't found any solution. The combination BuddyPress and AHP plugin repeat the first gravatar of a user and display for other users as well. I've tried to use function bp_blog_avatar but it doesn't work. The function which I am talking about is this:

    // get gravatar
    if ($use_grav) {$grav_img = get_avatar( $thispost[0]->user_email, '70');
    $thisgravatar = '<a href="'.$thisuser_url.'">'.$grav_img.'</a>';
    } else { $thisgravatar = ''; }

    Any ideas? Thank you.

  2. Romik84
    Member
    Posted 13 years ago #

    anyone for help? I am lost.

  3. Romik84
    Member
    Posted 13 years ago #

    nah, I have found a solution:

    change the line which I mentioned above to this:

    $userid = $wpdb->get_var("SELECT post_author FROM $blogPostsTable");

    and then find line starting $grav_img = and change it to:

    $grav_img = get_avatar($userid, '80', '');

    and your gravatars will be working fine.

About this Topic