Skip to:

Where are the user’s links

  • Where do I find the dynamic links that are all found in the users profile? On a custom page I want to give users the ability to link to their profile, wire, etc.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I understand that <?php bp_get_nav() ?> gets all the links and displays them, but if I wanted to display one at a time and link them off an icon, how would I do that?


    Profile photo of Burt Adsit
    Burt Adsit


    Well, I don’t see any bp template tags that get those specific things. However, for all members in bp the urls are the same. Example:

    member profile :

    Substitue in code ‘’ with your domain name and ‘username’ with a valid user’s username.

    Same scheme for all the other things you want to get to like the member’s wire.

    Take a look at the urls in the member adminbar under ‘my account’. Just hover on down the list and you’ll see the urls for each bit-and-piece in firefox at the bottom left of the window.

    Profile photo of Gogoplata


    What I did was added this code to my theme’s functions.php file:

    <?php function _user_name()


    global $userdata;


    echo $userdata->user_login;



    Then, you construct your links like this:<?php _user_name(); ?>/profile

    Just swap out “profile” for whatever you want to link to.

    Profile photo of Andy Peatling
    Andy Peatling


    Best way is to do it like this (for the logged in user):

    echo $bp['loggedin_domain'] . $bp['profile']['slug'];
    echo $bp['loggedin_domain'] . $bp['messages']['slug'];
    echo $bp['loggedin_domain'] . $bp['friends']['slug'];
    echo $bp['loggedin_domain'] . $bp['groups']['slug'];
    echo $bp['loggedin_domain'] . $bp['wire']['slug'];
    echo $bp['loggedin_domain'] . $bp['activity']['slug'];

    If you put that code inside a function, make sure you global $bp; at the top.

    <3 thanks guys.

    Profile photo of Greg


    Does Andy’s approach still apply to BP 1.0?

    This is what works for me now:

    echo $bp->loggedin_user->domain, $bp->profile->slug;

    echo $bp->loggedin_user->domain, $bp->messages->slug;

    echo $bp->loggedin_user->domain, $bp->friends->slug;

    echo $bp->loggedin_user->domain, $bp->groups->slug;

    echo $bp->loggedin_user->domain, $bp->wire->slug;

    echo $bp->loggedin_user->domain, $bp->activity->slug;

    If this is inside a function, “global $bp;” must be at the top of course.

    Does 1.0 have template tags to make this easier?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Where are the user’s links’ is closed to new replies.
Skip to toolbar