How to call Edit-Profile Slug
-
Hi,
I’m redesigning the buddypress theme to suit the needs of my site. As I’m not using many of the features of Buddypress I specifically want to streamline the buddypress profile menu (id=”object-nav”) and submenu (id=”subnav”). My idea is to have all the links from the subnav display within the object-nav menu.
I’ve done this by writing the following plugin function:function xf_add_nav_edit_profile() {
global $bp;
$nav_item_name = “Edit Profile”;
bp_core_new_nav_item( array(
‘name’ => $nav_item_name,
‘slug’ => $bp->profile->slug . “/edit/group/1”,
‘position’ => 21,
) );
}
add_action( ‘wp’, ‘xf_add_nav_edit_profile’, 2 );There is one mayor problem with what I am doing, I don’t know how to correctly call the Edit Profile page slug so I’ve resorted to a horrible concatenation ($bp->profile->slug . “/edit/group/1”). The result is that when the user clicks on the tab, he is redirected to the appropriate page but the tab does not get highlighted when selected. Can anyone tell me the correct way to call the edit profile slug? It would also be great if someone could tell me the Change Avatar Slug.
Thanks
Chopo
- The topic ‘How to call Edit-Profile Slug’ is closed to new replies.