Create Sub Nav Menu Item in Profile
-
Hi,
I’m having trouble creating a Sub Menu Item under a Parent Menu Item.
The parent menu item as shown below, named “TEST”, shows correctly, but the tabs named “SUB NAV” and “SUB NAV 2″ don’t show at all.
`
function my_setup_nav() {
global $bp;bp_core_new_nav_item( array(
‘name’ => ‘TEST’,
‘slug’ => $bp->account->slug,
‘position’ => 10,
)
);$em_link = $bp->loggedin_user->domain . $bp->account->slug . ‘/’;
bp_core_new_subnav_item( array(
‘name’ => ‘SUB NAV’,
‘slug’ => ‘account-sub’,
‘parent_url’ => $em_link ,
‘parent_slug’ => $bp->account->slug,
‘position’ => 10,
‘item_css_id’ => ‘xx’
)
);
bp_core_new_subnav_item( array(
‘name’ => ‘SUB NAV 2′,
‘slug’ => ‘account-sub-2′,
‘parent_url’ => $em_link ,
‘parent_slug’ => $bp->account->slug,
‘position’ => 20,
‘item_css_id’ => ‘xx-2′
)
);
}add_action( ‘bp_setup_nav’, ‘my_setup_nav’, 99 );
`Any suggestions?
You must be logged in to reply to this topic.