The full docs for bbp_list_forums
is here https://codex.bbpress.org/bbp_list_forums/
The quick and easy way is via this topic where you can add the code from that gist to your themes functions.php
how to display list of sub-forums on separate lines, instead of big blob?
there is a way to do it, someone posted few lines of code last year.. and it works. BUT I cannot find it now here on the forums, and I can’t remember how it was done :((
please search bbpress forums
After giving it some thought, how can I edit this code so that it puts the subforums into two or three columns instead of one column only?
function custom_bbp_list_forums() {
$args['separator'] = '<br />';
return $args;
}
add_filter('bbp_before_list_forums_parse_args', 'custom_bbp_list_forums' );
You kind of only have two options, the default bbPress behaviour like this:
- My 1st Child Forum (78, 425), My 2nd Child Forum (18, 107)
Or using the <br />
as the separator:
- My 1st Child Forum (78, 425)
- My 2nd Child Forum (18, 107)
Each element is returned as a whole so My 1st Child Forum (78, 425)
and My 2nd Child Forum (18, 107)
CANNOT be broken down further for multiple columns like this (which I think you are alluding to:
My 1st Child Forum
– 78
– 425
My 2nd Child Forum
– 18
– 107
Thank you for your reply. What I would like to do is this:
Subforum 1 (0, 0)
– Subforum 2 (0, 0)
Subforum 3 (0, 0)
– Subforum 4 (0, 0)
Subforum 5 (0, 0)
– Subforum 6 (0, 0)
- etc.
Your going to have to use $args['separator'] = ' ';
(Either a blank space or empty) and then use some CSS to style the bbp-forum-list
element.
If I could use divs or something, I could do it, but using only CSS I don’t know how I would do that. Can you help?
Thanks.
It is not really me expertise, check out what suggestions the author of the theme you are using on your site may have.
this code should put sub forums the way you want, add it to your functions.php child theme
function custom_bbp_list_forums() {
$args[‘separator’] = ‘<br />’;
return $args;
}
add_filter(‘bbp_before_list_forums_parse_args’, ‘custom_bbp_list_forums’ );
Yes, that’s already the code I’m using, but I am looking now to add two columns. Please look through thread.
Thank you.
Take a look at this, it should help you out.