If you want to change it everywhere then put this in your functions file
//This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == ‘Forum’ ) {
$translated_text = ‘new text’;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘change_translate_text’, 20 );
Functions files and child themes – explained !
This causes the following error, i added that in theme functions.php
Fatal error: Cannot redeclare change_translate_text() (previously declared in /home/joshtaylor/public_html/wp-content/plugins/bbp-last-post/includes/functions.php:60) in /home/joshtaylor/public_html/wp-content/themes/flycase/functions.php on line 105
ok that’s just because you can have only one function name, and this is duplicating an existing oine (in a plugin I wrote!)
Do this instead
//This function changes the text wherever it is quoted
function orko_change_translate_text( $translated_text ) {
if ( $translated_text == ‘Forum’ ) {
$translated_text = ‘new text’;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘orko_change_translate_text’, 20 );
Great to know that you developed the plugin, this some sort assures me of my solution. But the problem still persists with the code you provided, now it shows
Parse error: syntax error, unexpected T_STRING in /home/joshtaylor/public_html/wp-content/themes/flycase/functions.php on line 102
Just copy loop-forums.php from the bbPress plugin templates into a folder called bbpress in your child theme, or edit the one that is already custom from your theme to a child theeme.
Edit this and change Forum to what you want.
<li class="bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></li>
Pefect, worked like a charm. Thanks man