how can i change word Forums?
-
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.
-
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@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.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.
i will link again an image i hope my links are working.
Do you mean change the wording of the navigation tab that reads Forums?
yes @henrywright, is that possible?
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/
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.where can i find this Slugs?
im using WP v 4.2.2 BP v 2.4.2
A slug is what you see in the URL. So for example:
example.com/this-is-a-slug/
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.
any other way?
I think the language file is your best bet. Have you tried that?
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/
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.
@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 );
Hi @henrywright, 🙂
thank you for this. it works. and all good. super good 🙂Bruce.
@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.
wow that’s great @henrywright 🙂 thank you for this , i’ll try try this one. 🙂
Hi @henrywright . 🙂
i have tried it. it really change also the word of forums. but other nav menu disappear. like the messages and settings.Can you paste the code you’re using?
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 );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.
- The topic ‘how can i change word Forums?’ is closed to new replies.