Skip to:
Content
Pages
Categories
Search
Top
Bottom

how can i change word Forums?

  • @bruce30

    Participant

    Hi,
    Can i change the text Forums Button? The Forums Button in personal profile and in Group forums Button, if yes, How? please some idea and help.

Viewing 25 replies - 1 through 25 (of 25 total)
  • @henrywright

    Moderator

    Hi @bruce30

    Give this guys a shout over at bbPress.

    @bruce30

    Participant

    hi @henrywright, 🙂
    thank you for your response, i already posted this topic on bbp but they say its on buddypress. now im confuse. where should i go?. please help

    @casiepa

    Participant

    @henrywright,
    Are you sure this is a bbPress thing ? In the profile of a standard WordPress/bbPress install, I don’t seem to have a ‘Forum’ button in my profile.
    Pascal.

    @bruce30

    Participant

    Hi @henrywright,
    Hello @casiepa, 🙂
    i link an image here, (i hope this likk will work :))to show what it looks like. that’s how it looks like, the personal profile of each user, if you observe the menu below the cover photo. together with the notification and messages, there is a “Forums” i what to change it, the same with The Group page after the home button, i hope you can help me, 🙂

    Bruce.

    @bruce30

    Participant

    i will link again an image i hope my links are working.

    @henrywright

    Moderator

    Do you mean change the wording of the navigation tab that reads Forums?

    @bruce30

    Participant

    yes @henrywright, is that possible?

    @henrywright

    Moderator

    I think so with the use of a language file.

    Ref: https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/

    Also, according to the Customizable Slugs in BuddyPress article, you should be able to add this to your wp-config.php file to change your slug:

    define ( 'BP_FORUMS_SLUG', 'discussions' );

    Ref: https://buddypress.org/2009/05/customizable-slugs-in-buddypress/

    @bruce30

    Participant

    hi @henrywright,
    thanks for this info. i have tried it but mine is not changing. i already put that code inside the wp-config.php, and also in bp-custom.php.

    @bruce30

    Participant

    where can i find this Slugs?

    @bruce30

    Participant

    im using WP v 4.2.2 BP v 2.4.2

    @henrywright

    Moderator

    A slug is what you see in the URL. So for example:

    example.com/this-is-a-slug/

    @bruce30

    Participant

    i think mine really change the slug, but i did not notice it because im looking at the nav menu if the word Forums changes. im not looking in the URL.

    @bruce30

    Participant

    any other way?

    @henrywright

    Moderator

    I think the language file is your best bet. Have you tried that?

    @danbp

    Participant

    Hi,

    you need to use bbpress.po translation file, even if your site is in default english language.
    Or if you only want to modify one word, you can use this snippet from inside your child-theme’s functions.php (will also work in bp-custom.php)

    function bruce_change_name( $translated, $original_text, $domain ) {
    		
    	if ( 'bbpress' !== $domain )  
    	return $translated; 
    	
    	switch ( $original_text ) {
    		
    		case 'Forums':  // original word
    		return 'Four Rhum'; // your custom word
    		
    		default:
    		return $translated;
    	}
    }
    add_filter( 'gettext', 'bruce_change_name', 10, 3 );

    WP reference: https://developer.wordpress.org/reference/hooks/gettext/

    @bruce30

    Participant

    hi @danbp, 🙂
    Thank you for so much, works. im so happy. 🙂 but how about in Group page?
    and can i use the same code to change other nav menus?

    thank you too @henrywright for trying to help me. 🙂

    Bruce.

    @henrywright

    Moderator

    @bruce30, building on @danbp’s answer, you can add another case. Take a look at this example below which has 4 cases. Feel free to add or remove cases yourself. The number of cases you use will depend on the number of words or phrases you need to change.

    function bruce_localisation( $translated, $original_text, $domain ) {
    
        switch ( $original_text ) {
            // 1
            case 'Forums':
                return 'Discussions';
    
            // 2
            case 'Forum':
                return 'Discussion';
    
            // 3
            case 'Piano':
                return 'Guitar';
    
            // 4
            case 'Lion':
                return 'Tiger';
    
            default:
                return $translated;
        }
    }
    add_filter( 'gettext', 'bruce_localisation', 10, 3 );

    @bruce30

    Participant

    Hi @henrywright, 🙂
    thank you for this. it works. and all good. super good 🙂

    Bruce.

    @henrywright

    Moderator

    @bruce30 I’ve made an edit to the code above which means it’ll now work for all text on your site, not just bbPress or BuddyPress text. So now if a new third-party plugin you add decides to use the word Forum, that will also be translated. I think this is a better approach.

    @bruce30

    Participant

    wow that’s great @henrywright 🙂 thank you for this , i’ll try try this one. 🙂

    @bruce30

    Participant

    Hi @henrywright . 🙂
    i have tried it. it really change also the word of forums. but other nav menu disappear. like the messages and settings.

    @henrywright

    Moderator

    Can you paste the code you’re using?

    @bruce30

    Participant

    hi @henrywright,
    i just use this code,

    function bruce_localisation( $translated, $original_text, $domain ) {

    switch ( $original_text ) {
    // 1
    case ‘Forums’:
    return ‘Discussions’;

    // 2
    case ‘Forum’:
    return ‘Discussion’;

    }
    }
    add_filter( ‘gettext’, ‘bruce_localisation’, 10, 3 );

    @bruce30

    Participant

    i hope someones still there. 🙂
    i still cant change the Messages word, that comes from the buddypress right? no problem with the Forum word, its already changed.

Viewing 25 replies - 1 through 25 (of 25 total)
  • The topic ‘how can i change word Forums?’ is closed to new replies.
Skip to toolbar