Skip to:
Content
Pages
Categories
Search
Top
Bottom

Full BP Avatar URL

  • Avatar of Jonski
    Jonski
    Participant

    @jonski

    In a multisite blog template

    delivers the thumb avatar, but I want the url to the full version of the users BP avatar.

    how is this possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

    What function is the theme using to get the user’s avatar? get_avatar()?

    Avatar of Jonski
    Jonski
    Participant

    @jonski

    yes,

    echo get_avatar( get_the_author_meta(‘user_email’), $size = ’50′ );

    delivers the avatar, but if size>50 it just stretches the thumb. Is there a way to just get the url of the full size avatar?

    cheers.

    Avatar of shanebpdev
    shanebp
    Participant

    @shanebp

    Try this:
    `
    global $post; // probably don’t need this
    $author_id=$post->post_author;

    $avatar = bp_core_fetch_avatar( array( ‘item_id’ => $author_id, ‘type’ => ‘full’ ) );
    echo $avatar;
    `

    If you want to specify the height / width you can do this:
    `
    $avatar = bp_core_fetch_avatar( array( ‘item_id’ => $author_id, ‘type’ => ‘full’, ‘height’=>105,’width’=>105 ) );
    `

    Avatar of Jonski
    Jonski
    Participant

    @jonski

    Yes that does it. Thanks. :)

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.