bp_is_group()

Does the current page belong to a single group?

Description

Will return true for any subpage of a single group.

Return

(bool) True if the current page is part of a single group.

Source

File: bp-core/bp-core-template.php

function bp_is_group() {
	$retval = bp_is_active( 'groups' );

	if ( ! empty( $retval ) ) {
		$retval = bp_is_groups_component() && groups_get_current_group();
	}

	return (bool) $retval;
}

Changelog

Changelog
Version Description
BuddyPress 1.2.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.