Forums

Join
bbPress Support ForumsTroubleshootingAvatar link to user profile..

Info

Tags

Avatar link to user profile..

  1. Hello all..

    I want to add a link to user avatar..so that when an avatar is clicked it navigates to that users profile,same as <?php post_author_title_link(); ?> does.I tried to add an anchor tag for avatar..but don't know what values is to be passes in href attribute.

    Please help !

  2. Hey Guys..

    I got solution for this problem >>

    In anchor tag put href value as :

    <?php user_profile_link(get_post_author_id()); ?>

    Now whenever someone clicks on any users avatar on topic.php page it will navigate to that user's profile.

    Thanks !

  3. If you're looking for a bit more control over things, you could do this:

    $global $bb_current_user;

    $profile_link = get_user_profile_link( $bb_current_user->ID );
    $profile_avatar = bb_get_avatar($bb_current_user->ID, 100);

    Ok, it's not letting me put links in, but that'll allow you to output the code as you wish :)

  4. You must log in to post.