How to Hide Child Forums or Sub-Forums from the Main Forum Page in BBPress
0 (0)

how to hide child forums subforums from home page bbpress
Rate this post!
 

It seems to be insanely difficult to find out how to hide subforums or child forums from the main forum page in BBPress, even though it seems like such a simple and obvious thing to want to do. As it turns out, how to hide subforums is simple, it’s just not obvious.

First, to show you what we mean, here’s a live example.


The website at DadsRights.org recently launched a set of fathers rights forums. One section of their forums is the state-by-state listings, meaning that they have 50 subforums in that section (one for each state). Out of the box, this is how the forums home page looks with this set of subforums:

how to hide subforums child forums bbpress

Pretty cluttered, right? You can see why they may have wanted to tidy that up a bit.

No Paywall Here!
The Internet Patrol is and always has been free. We don't hide our articles behind a paywall, or restrict the number of articles you can read in a month if you don't give us money. That said, it does cost us money to run the site, so if something you read here was helpful or useful, won't you consider donating something to help keep the Internet Patrol free?
Click for amount options
Other Amount:
What info did you find here today?:

 

In fact, what DadsRights.org wanted was to make it look like this:

how to hide child forums subforums from home page bbpress

 

Now, doesn’t that look better?

 

And, when someone clicks on the “State by State Information” forum, what they see is:

subforums child forums hidden from main forum page

 

Perfect!

Now, how to do this?

As you may have discovered, if you searched Google or other Internet search sites for this information, there isn’t much out there, and what is out there tells you that you need to change and fiddle with the line <?php if (bb_forums()); ? >.

But it’s actually much simpler than that. At least it is for some WordPress / BBPress installs – we can’t promise that this easy fix will work for all combinations of WordPress, BBPress, and various themes.

Instead of editing the line <?php if (bb_forums());? >, do this:

Go to your /plugins/bbpress directory.

Now go to the /templates/default/bbpress/ subdirectory.

There you will see the loop-single-forum.php file.

Make a backup of the loop-single-forum.php file!

Really, make the backup! Don’t say that we didn’t warn you!

Now, edit the loop-single-forum.php file, and find the line with <?php bbp_list_forums(); ?>.

We found it on line number 44:

bbp_list_forums on line 44

 

Now, simply delete that line, save the file, and you’ll find that the subforum list is completely gone from your forum home page, with the added advantage that when you click on the forum to get to the subforums, the list of subforums is nice and neat!

subforums child forums hidden from main forum page

No Paywall Here!
The Internet Patrol is and always has been free. We don't hide our articles behind a paywall, or restrict the number of articles you can read in a month if you don't give us money. That said, it does cost us money to run the site, so if something you read here was helpful or useful, won't you consider donating something to help keep the Internet Patrol free?
Click for amount options
Other Amount:
What info did you find here today?:

People also searched for display bbpress forums and child forums in a list
Rate this post!
 
Summary
How to Hide Child Forums or Sub-Forums from the Main Forum Page in BBPress
Article Name
How to Hide Child Forums or Sub-Forums from the Main Forum Page in BBPress
Description
It seems hard to find out how to hide subforums or child forums from the main forum page in BBPress, but it turns out to be simple, just not obvious. Here's how.
Author

One thought on “How to Hide Child Forums or Sub-Forums from the Main Forum Page in BBPress
0 (0)

  1. Hi,

    this css trick is even easier way to hide subforums :)

    #bbpress-forums .bbp-forums-list {
    display: none;
    }

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.