do you know how to add something to your childtheme functions file ?
Hi Robin,
In functions.php? I do know how to enter code there, via ftp or cPanel. I just don’t know what code to enter to solve for this. 🙂
Chris
great
than add this
//This function changes the text wherever it is quoted
function rew_change_translate_text( $translated_text ) {
if ( $translated_text == 'This forum is empty.' ) {
$translated_text = 'new text';
}
return $translated_text;
}
add_filter( 'gettext', 'rew_change_translate_text', 20 );
Instead of ‘This forum is empty.’ you will get ‘new text’, so just change new text to what you want
eg change the line
$translated_text = 'new text';
to
$translated_text = 'Categories listed below';
– if you want it blank then have that line say
$translated_text = '';
Thanks much. that worked. 🙂
Is there no way to remove that element all together? Or at least if I knew which
CSS file this is formatted in, I could play around with the spacing. That text takes
up quite a bit of space at the top of the forum and pushes everything down further than
I would like.
I am pretty good as user the inspector to identify areas to change but I have a heack of a time determine which css file is involved.
Thanks again for your help!
Chris
if you have a child theme, and are happy with ftp, I can give you a revised template
sure that would be great. Thanks 🙂
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress
where %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php
Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/content-single-forum.php
bbPress will now use this template instead of the original
and you can amend this
so change line 26 from
<?php bbp_single_forum_description(); ?>
to
<?php if (bbp_get_single_forum_description != 'This forum is empty.') bbp_single_forum_description(); ?>
Thanks, I’ll give this a try and let you know how it goes.
hello how can i add link on text ??
if ( $translated_text == 'This forum is empty.' ) {
$translated_text = 'new text';
}
add_filter( 'gettext', 'rew_translations', 20 , 3 );
function rew_translations( $translated, $text, $domain ) {
if ($domain != 'bbpress' return $translated;
if ( $translated == 'This forum is empty.' ) {
$translated = 'new text';
}
return $translated;
}