Tagged: add subnav item, buddypress, friends, members Profile
Hi,
How can I add a subnav “invite friends” to the members profile – Friends – next to the Requests subnav? When a member clicks on the “invite friends” tab, it takes them to the members page. However the “invite friends” must not display when viewing another member’s Profile – friends.
Thanks in advance 🙂
Hi Chris,
Welcome to BuddyDev forums.You can use the following code in your bp-custom.php to do that
function buddydev_setup_dummy_nav() { $friends_slug = bp_get_friends_slug(); bp_core_new_subnav_item( array( 'name' => 'Invite', 'slug' => 'do-invite', 'parent_slug' => $friends_slug, 'parent_url' => trailingslashit( bp_loggedin_user_domain() . $friends_slug ) , 'link' => get_permalink( buddypress()->pages->members->id ), //where the Link should pint to for this sub nav? 'screen_function' => function () {} )); } add_action( 'bp_setup_nav', 'buddydev_setup_dummy_nav' );
Hope it helps.
Regards
BrajeshHi Chris,
Can you please check and let me know?Thank you
Brajesh
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.
This topic is: resolved