Skip to:
Content
Pages
Categories
Search
Top
Bottom

This forum is empty

  • @chrtravels

    Participant

    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 13 replies - 1 through 13 (of 13 total)
  • @robin-w

    Moderator

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

    @chrtravels

    Participant

    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

    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

    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

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

    @chrtravels

    Participant

    sure that would be great. Thanks 🙂

    @robin-w

    Moderator

    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

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

    @gkldh

    Participant

    hello how can i add link on text ??

    if ( $translated_text == 'This forum is empty.' ) {
    	$translated_text = 'new text';
    }

    @robin-w

    Moderator
    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;
    }

    @terefoster777

    Participant

    I am trying to do the same change. I want to get rid of the box that says, “THIS FORUM IS EMPTY.” Why does it need to be there? It’s so uninviting.

    I am using the forum as a category, which is an option, so why does it insert “THIS FORUM IS EMPTY” when I choose “CATEGORY”? That message should automatically change or disappear when a forum is used as a category. That would be a permanent and logical fix on the developer’s end.

    My problem is that I don’t know where to insert the code that you suggested above. Is it on the site dashboard or in the site hosting? Please start the instructions farther back.

    @robin-w

    Moderator

    To do this without code install

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Forums Index Styling item 16

    or with the code above use

    Code Snippets

    @terefoster777

    Participant

    WoW!!

    BBp style pack has everything.

    Thanks!

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