Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Add an item to submenu of Activity

@danbp

Participant

hi @deshmukh,

add this to bp-custom.php

function bpfr_custom_profile_sub_nav() {
	global $bp;
	$parent_slug = 'activity';
		
	//Add subnav item 	 
	bp_core_new_subnav_item( array( 
	'name'            => __( 'Go to Site Activity' ), 
	'slug'            => $parent_slug, 
	'parent_url'      => $bp->loggedin_user->domain . $parent_slug.'/', 
	'parent_slug'     => $parent_slug, 
	'screen_function' => 'bp_activity_screen_my_activity',
	'position'        => 60,
	'link'            => bp_get_activity_directory_permalink(),
	) );
}
add_action( 'bp_setup_nav', 'bpfr_custom_profile_sub_nav' );

Reference

Skip to toolbar