Skip to:
Content
Pages
Categories
Search
Top
Bottom

Avatar link to user profile..


  • sureshdrim
    Participant

    @sureshdrim

    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 !

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

  • sureshdrim
    Participant

    @sureshdrim

    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 !


    kevinjohngallagher
    Member

    @kevinjohngallagher

    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 :)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar