Skip to:

Opened 10 years ago

Closed 10 years ago

#2551 closed enhancement (invalid)

Forum link for group forums

Reported by: derricksmith01's profile derricksmith01 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Extend - BuddyPress Keywords:


I'm not sure if this is the best place to post this and it is my first contribution to this project so go easy on me. I'm using the group forums component of bbpress and don't want to show the Forum link for users that are not members of the group.

I modified the maybe_unset_forum_menu() function in includes/extend/groups.php to not display the link for users that are not logged in.

public function maybe_unset_forum_menu() {

		// Bail if not viewing a single group
		if ( ! bp_is_group() )

		// Are forums enabled for this group?
		$checked = bp_get_new_group_enable_forum() || groups_get_groupmeta( bp_get_new_group_id(), 'forum_id' );
		// Is user a group member?
		if (!groups_is_user_member( bp_displayed_user_id(), bp_get_group_id() )) $checked = false;

		// Tweak the nav item variable based on if group has forum or not
		$this->enable_nav_item = (bool) $checked;

Can this be added as an enhancement?

Change History (2)

#1 @derricksmith01
10 years ago

The following line seems to work better.

if (groups_is_user_member( bp_loggedin_user_id(), bp_get_group_id()) && !is_admin()) $checked = 0;

#2 @netweb
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the ticket.

We don't explicitly want to hide the forum menu for public BuddyPress groups, these groups are publicly accessible and the forums should be also.

If you want to hide BuddyPress group content including forums for users not logged in you should use either private or hidden groups.

Closing as wontfix.

Note: See TracTickets for help on using tickets.