Subforum list not displaying if all subforums are private
-
It seems bbp_get_forum_subforum_count() does not return private forums. So when all the subforums are private, this funcion returns 0 which causes the list forums function to bail.
I got it around it by creating the following filter to count the forums:
add_filter( 'bbp_get_forum_subforum_count', 'my_subforum_count', 3 );
function my_subforum_count( $forum_count, $forum_id ) {
$subforums = bbp_forum_get_subforums( array( 'post_parent' => $forum_id ) );
return count( $subforums );
}Please advise if you’d like me to create a trac ticket for this. I didn’t want to create a ticket in case it already exists or I’m just doing something wrong.
Thanks,
John
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.