bp_groups_has_directory()

Check whether there is a Groups directory page in the $bp global.

Description

Return

(bool) True if set, False if empty.

Source

File: bp-groups/bp-groups-functions.php

function bp_groups_has_directory() {
	$bp = buddypress();

	return (bool) !empty( $bp->pages->groups->id );
}

Changelog

Changelog
Version Description
BuddyPress 1.5.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.