groups_get_id( string $group_slug )
Get a group ID by its slug.
Description
Parameters
- $group_slug
-
(Required) The group's slug.
Return
(int|null) The group ID on success; null on failure.
Source
File: bp-groups/bp-groups-functions.php
function groups_get_id( $group_slug ) { return BP_Groups_Group::group_exists( $group_slug ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.6.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.