Solved – How to create a link to username/activity in the main menu?
-
Hello, I found this code to add a link to the buddypress profile to the main menu, I would like to know if it is possible to modify it a little to point to mysite.com/membres/#username#/activity instead?
// Filter wp_nav_menu() to add 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( '/' ) . '">' . __('PROFIL') . '</a></li>'; $menu = $menu . $profilelink; return $menu; } add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.