Skip to:
Content
Pages
Categories
Search
Top
Bottom

Create a menu item to the current user's profile

  • @horroruk

    Participant

    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)
  • @bphelp

    Participant

    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 = '<li><a href="' . bp_loggedin_user_domain( '/' ) . '" rel="nofollow">' . __('My Profile') . '</a></li>';
    		$menu = $menu . $profilelink;
    		return $menu;
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Create a menu item to the current user's profile’ is closed to new replies.
Skip to toolbar