Skip to:
Content
Pages
Categories
Search
Top
Bottom

Full BP Avatar URL


  • 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)
  • What function is the theme using to get the user’s avatar? get_avatar()?


    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.


    shanebp
    Moderator

    @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 ) );
    `


    Jonski
    Participant

    @jonski

    Yes that does it. Thanks. :)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Full BP Avatar URL’ is closed to new replies.
Skip to toolbar