Quantcast
Viewing all articles
Browse latest Browse all 14

Reply To: [Resolved] Need guidance about member links

Found a solution to 1:

/ 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;
}

I have one more question involving it though, is there a way to change this to display the users name instead of the “my profile” I added? Also, the link showed up as the very last item to the right of all my other category/page links defined in the “Primary Menu” I created. I want it to be the very first on the left, how do I do that?

Thanks!


Viewing all articles
Browse latest Browse all 14

Trending Articles