Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I change the name of a profile tab

  • @bluesweet

    Participant

    I just want to change the name of the activity tab in the profile page. I DON”T want to change slug or function.

Viewing 5 replies - 1 through 5 (of 5 total)
  • @bluesweet

    Participant

    i found this snippet and it works great …

    // Setup the navigation
    // Props to http://wordpress.stackexchange.com/questions/16223/add-buddypress-profile-menu-item for helping me figure this out
    // http://themekraft.com/customize-profile-and-group-menus-in-buddypress/
    function my_setup_nav() {
    global $bp;

    // Change the order of menu items
    $bp->bp_nav[‘messages’][‘position’] = 100;

    // Remove a menu item
    $bp->bp_nav[‘conversations’] = false;

    // Change name of menu item
    $bp->bp_nav[‘communities’][‘name’] = ‘My Conversations’;
    }

    add_action( ‘bp_setup_nav’, ‘my_setup_nav’, 1000 );

    @bluesweet

    Participant

    After making the changes that I wanted
    Change “activity tab” to “Social Wall”
    Change “docs” to “Official Docs”
    Hope this helps ….

    // Setup the navigation
    // Props to http://wordpress.stackexchange.com/questions/16223/add-buddypress-profile-menu-item for helping me figure this out
    // http://themekraft.com/customize-profile-menus-in-buddypress/
    function my_setup_nav() {
    global $bp;

    // Change name of menu item
    $bp->bp_nav[‘docs’][‘name’] = ‘Official Docs’;
    // Change name of menu item
    $bp->bp_nav[‘activity’][‘name’] = ‘Social Wall’;
    }

    add_action( ‘bp_setup_nav’, ‘my_setup_nav’, 1000 );

    @bluesweet

    Participant

    ONE MORE THING….
    I placed this code in the Code Snippets plugin.
    I love this plugin!!!

    @vapvarun

    Participant

    @bluesweet renaming tab, use language file approach

    Customizing Labels, Messages, and URLs

    @ixistudio

    Participant

    It seems like the “bp_nav” is deprecated, now I use te code below to change the tab labels:

    function ns_profile_tab_labels() {
    
      global $bp;
    
      $bp->members->nav->edit_nav( array(
        'name' => __('My Timeline', TEXT_DOMAIN),
      ), 'activity' );
    
      $bp->members->nav->edit_nav( array(
        'name' => __('My Connections', TEXT_DOMAIN),
      ), 'friends' );
    
      $bp->members->nav->edit_nav( array(
        'name' => __('My Profile', TEXT_DOMAIN),
      ), 'profile' );
    
      $bp->members->nav->edit_nav( array(
        'name' => __('My Groups', TEXT_DOMAIN),
      ), 'groups' );
    
      $bp->members->nav->edit_nav( array(
        'name' => __('My Photos', TEXT_DOMAIN),
      ), 'photos' );
    
    }
    
    add_action( 'bp_setup_nav', 'ns_profile_tab_labels', 1000 );

    Goes in your functions.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar