Skip to:
Content
Pages
Categories
Search
Top
Bottom

insert in WP menu a tab that link to Bp profile.


  • etiennew
    Participant

    @etiennew

    hello

    Word press 3.8.1
    buddypress1,9,2
    i can t put site cause it’s on local

    In the wordpress menu I would like to add a link to the buddypress user profile. I would like to create a new tab on my main menu called “My Profile” that redirects to the unique buddypress user profile page. My problem is that these links are dynamic based on the username.

    What I would like to achieve:
    –>User1 logs in and clicks on http://website.com/my-profile and is redirected to http://website.com/members/user1/profile/

    –>User2 logs in and clicks on http://website.com/my-profile and is redirected to http://website.com/members/user2/profile/

    i have tried the solution of that old post where it was proposed to add the code below at the end of function.php of theme

    }

    // Filter wp_nav_menu() to add profile link

    add_filter( ‘wp_nav_menu_items’, ‘my_nav_menu_profile_link’ );
    function my_nav_menu_profile_link($menu) {
    if (!is_user_logged_in())
    return $menu;
    else
    $profilelink = ‘

    ‘ . __(‘My Profile’, ‘buddypress’ ) . ‘

    ‘;
    $menu = $menu . $profilelink;
    return $menu;
    }
    ?>

    but this one does not work certainly because it’s for old version of buddypress 1.5
    does anyone has a solution that suit the new version of Buddypress

    thanks a lot for answear.

Viewing 2 replies - 1 through 2 (of 2 total)
  • BP 1.9 introduced menu link selection on the WP ‘Menu’ screens, used to add links in just the same way you add pages, cats etc, is that not visible in your menu screen?


    etiennew
    Participant

    @etiennew

    Hello Hugo,

    thanks for answear

    when you’re talking about menu screen, do you meen

    apperance/menu ?

    if it’s that, no i can’t see it i only see
    pages
    links
    categories

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘insert in WP menu a tab that link to Bp profile.’ is closed to new replies.
Skip to toolbar