Reply To: bbp_has_topics – hide topics from private grou
Put this before the code we’ve been talking about, and see what it displays on the page:
$test_id = bp_get_current_group_id();
echo 'The current group ID is:' . $test_id;
If it returns a number besides zero (zero means that it can’t figure out which group is the current group, a non-zero number is the current group ID), then you could probably adjust the conditional code:
if ( bp_group_is_visible( bp_get_current_group_id() ) ) {
//do the topics loop here
}
Fingers crossed.