BuddyDev

Search

Rename BuddyPress Profile Menu items

  • Participant
    Level: Enlightened
    Posts: 60
    lavish on #4700

    Hi!

    I have been trying to find a way to change the names / text of at least 2 BuddyPress member profile menu items. Can someone here help me please?

    I want to change ‘Friends’ to ‘Connections’ and ‘Groups’ to ‘Clubs’.

    Many thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #4702

    Hi Lavis,
    You can do that easily using any translation tool. I will recommend using Poedit and translating the string.

    Hope that helps.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 60
    lavish on #4707

    Hello Brajesh,

    Thank you for the quick reply. I have always used translations files. unfortunately it’s just now that it is not working.

    May be because I have po / mo files from BP 2.1 and it is now BP 2.6. So may be I need to use new po file and do that long hectic work all over again (I have too many translations). Isn’t there a way to copy my existing translations from old to new file?

    Thank you again

  • Participant
    Level: Enlightened
    Posts: 60
    lavish on #4709

    I tried with the latest pot file from BP 2.6 (latest) and translated all occurrences of ‘Friends’ and ‘Groups’ but it is still not working. My buddypress-en_US.mo had been saved in wp-content/languages/ and had always worked.

    In fact all other translations other than profile nav items are still working with my old mo file (from BP 2.1).

    I also tried changing the language in WordPress settings, still no avail.

  • Participant
    Level: Enlightened
    Posts: 60
    lavish on #4744

    Following code worked for me

    ‘function bpcodex_rename_profile_tabs() {

    buddypress()->members->nav->edit_nav( array( ‘name’ => __( ‘Connections’, ‘textdomain’ ) ), ‘connections’ );
    buddypress()->members->nav->edit_nav( array( ‘name’ => __( ‘Clubs’, ‘textdomain’ ) ), ‘clubs’ );

    }
    add_action( ‘bp_actions’, ‘bpcodex_rename_profile_tabs’ );’

    reference – https://codex.buddypress.org/developer/navigation-api/ & https://buddypress.org/support/topic/rename-buddypress-profile-nav-items/

    Thank you!

  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #4753

    Hi Lavis,
    That is another approach for navigation but using po/mo is still preferred way. If it is not working, Please create a bug report on BuddyPress trac.

  • Participant
    Level: Enlightened
    Posts: 60
    lavish on #4759

    Hello @sbrajesh

    Is there a way to change the sub slugs too? What I mean is, for example club settings (manage >> settings) has a URL –

    mysite-com/clubs/club-name/admin/group-settings/

    I expect this to become

    mysite-com/clubs/club-name/admin/club-settings/

    Thank you

    • This reply was modified 6 years ago by lavish.

You must be logged in to reply to this topic.

This topic is: not resolved