Skip to:
Content
Pages
Categories
Search
Top
Bottom

This forum is empty


  • chrtravels
    Participant

    @chrtravels

    Hi all,

    This may be a basic question but I haven’t found an answer in the search.

    If I create a group category and forums underneath that, you cannot assign a category to a buddypress group.

    However I can make the parent category a forum instead. This will then allow you to assign this to a group and see the categories underneath. It looks messy though because when you click on the parent forum it says “this forum is empty.” Though it does let you see the categories below this message.

    Is there a way to just remove the “this forum is empty message? I don’t want it to say this underneath every parent forum.

    Thanks much,
    Chris

Viewing 8 replies - 1 through 8 (of 8 total)

  • Robin W
    Moderator

    @robin-w

    do you know how to add something to your childtheme functions file ?


    chrtravels
    Participant

    @chrtravels

    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


    Robin W
    Moderator

    @robin-w

    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 = '';


    chrtravels
    Participant

    @chrtravels

    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


    Robin W
    Moderator

    @robin-w

    if you have a child theme, and are happy with ftp, I can give you a revised template


    chrtravels
    Participant

    @chrtravels

    sure that would be great. Thanks 🙂


    Robin W
    Moderator

    @robin-w

    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(); ?>


    chrtravels
    Participant

    @chrtravels

    Thanks, I’ll give this a try and let you know how it goes.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar