@mbv
7 years ago
Is it possible to change the menu only for the user’s own profile pages, so that for example, instead of “Profile” it says “My Profile”…?
I see that with this code, I can change the label as such, but it changes for all pages…
function mb_profile_menu_tabs(){ global $bp; $bp->bp_nav['profile']['name'] = 'My Profile'; } add_action('bp_setup_nav', 'mb_profile_menu_tabs', 201);
So, how to specify only for when user is viewing their own profile pages?
Thanks 🙂
@boonebgorges
Here’s how you’d modify the code you’ve provided:
function mb_profile_menu_tabs(){ global $bp; if ( bp_is_my_profile() ) { $bp->bp_nav['profile']['name'] = 'My Profile'; } } add_action('bp_setup_nav', 'mb_profile_menu_tabs', 201);
Wow, that’s perfect!
Thank you so much, Boone!