Skip to:
Content
Pages
Categories
Search
Top
Bottom

Menus


  • trinzia
    Participant

    @trinzia

    In my theme, I need to separate the links in the menu: bp_get_displayed_user_nav(). For example, I need ‘edit profile’ link to have a different name and be in a completely different spot in the page.

    Accordingly, I was trying to create my own links, since I can’t find if they exist somewhere already as functions. I guess the link would look like:
    http://www.mydomain.com/members/{username}/profile/edit/

    Should make my own link or is there a function for each link type?

    If I need to make my own, how do I say “if user is logged in, and is also looking at his own page, then place an Edit link here.” I got the URL for currently logged-in user, but I think that I am going to have issues if someone’s looking at someone else’s page while logged in. Then I don’t want the edit button to appear.

     $ttyurl = home_url();
     global $current_user;
     $username = $current_user->user_login;
     echo $ttyurl . '/members/' . $username; 

    How should I do this?
    Thanks!

  • The topic ‘Menus’ is closed to new replies.
Skip to toolbar