Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom "my profile" link in header

  • @mighty_fox

    Participant

    I am using BBPress and in the header I have created an login/logout section for when a guest or user is logged in. I’m currently trying to create a “My Profile” link when a user is logged in but I’m unsure of the functions to achieve this (or if I am using the right functions currently). My code for this currently is:

    if(is_user_logged_in()) {
    global $current_user;
    get_currentuserinfo(); $text .= 'Hi '.$current_user->display_name.'!';
    echo $text;
    echo "#"'>My Profile | Logout"; }
    else{echo "You are currently not logged in!";
    echo "Register |
    Log in"; }

    • This topic was modified 12 years, 2 months ago by mighty_fox.
    • This topic was modified 12 years, 2 months ago by mighty_fox.
Viewing 3 replies - 1 through 3 (of 3 total)
  • @zaerl

    Participant

    bbp_user_profile_link( $user_id = 0 ) for the link, bbp_get_user_profile_url( $user_id = 0 ) for the URL.

    @mighty_fox

    Participant

    Thank you 🙂

    @ga13ush

    Participant

    Hi, i dont undertand how to use the profil link. Is it like (its not working) :

    <?php echo '<a href="'.get_profile_tab_link( bb_get_current_user_info( 'id' ), "edit" ).'">edit your profile</a>' ?>

    Thanks for your help

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