Skip to:
Content
Pages
Categories
Search
Top
Bottom

Create a menu item to the current user's profile

  • Avatar of horroruk
    HorrorUK
    Participant

    @horroruk

    Is there a way to create a menu item that, when clicked on, will take the user to their own profile, enabling them to make any edits and check on things?

Viewing 1 replies (of 1 total)
  • Avatar of bp-help
    bp-help
    Participant

    @bphelp

    You can add this code to bp-custom.php
    Snippet courtesy of @mercime
    `
    // 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’) . ‘
  • ‘;
    $menu = $menu . $profilelink;
    return $menu;
    }
    `

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.