This is for the admin bar:
function custom_adminbar_titles() {
global $wp_admin_bar;
$wp_admin_bar->add_menu( array(
'id' => 'my-account-groups-memberships',
'title' => 'new title here',
)
);
}
add_action( 'wp_before_admin_bar_render', 'custom_adminbar_titles' );
This is for profile menu:
function change_profile_submenu_tabs(){
global $bp;
$bp->bp_options_nav['groups']['my-groups']['name'] = 'new name here';
}
add_action('bp_setup_nav', 'change_profile_submenu_tabs', 999);
Very good, I have used that code though it is not working in this situation. Kind of why I ran into a wall.
The sub nav for groups > memberships is empty.
For example: the slug for groups is /members/users/groups/ and the sub nav “memberships” slug is /members/users/groups/ so what would I put into the second slug? I’ve tried “/” and just leaving it empty but that doesn’t work.
and $bp->bp_nav[‘groups’][‘name’] = ‘new name’; will not work either since it’s a sub nav.
Ah nevermind. apparently it was “my-groups” duh lol. I don’t know why it wouldn’t show up as a slug though.
Could you possibly help me one another issue?
Within the groups I have changed all of the navigation menu using;
function jm_move_group_activity_tab() {
global $bp;
if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) {
$bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['name'] = 'new name';
$bp->bp_options_nav[$bp->groups->current_group->slug]['home']['name'] = 'new name';
$bp->bp_options_nav[$bp->groups->current_group->slug]['members']['name'] = 'new name';
$bp->bp_options_nav[$bp->groups->current_group->slug]['admin']['name'] = 'new name';
$bp->bp_options_nav[$bp->groups->current_group->slug]['send-invites']['name'] = 'new name';
}
}
add_action('bp_init', 'jm_move_group_activity_tab');
Though, I am unable to get the “forum” slug to change. I have tried many other options though nothing seems to work. Do you know if there may be another script for just that?
try bp_setup_nav instead of bp_init
Good idea. I tried but receive the same results.
tab names not right or priority off
add_action(‘bp_setup_nav’, ‘jm_move_group_activity_tab’, 999);
That line didn’t work either.
I’ve tried on a clean install also, I receive the same results.
I’m wondering if there must be some other function since it’s buddypress integrating with bbpress.
The solution is
function change_translate_text( $translated_text ) {
if ( $translated_text == 'Forums' ) {
$translated_text = 'Chapters';
}
return $translated_text;
}
add_filter( 'gettext', 'change_translate_text', 20 );
Thank you for your help