Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get group_name from group_id when not on a group page?

  • @joshkadis

    Member

    On a non-group page and outside the groups-loop, is there a way to pass a group_id to a function that will return that group’s name?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @nuprn1

    Participant

    can use `groups_get_group` which returns a group object then pass the object to `bp_get_group_name`

    @anonymized-96400

    Inactive

    Something like this will work as well:

    `$group = new BP_Groups_Group( $group_id );
    return $group->name;`

    @joshkadis

    Member

    awesome, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get group_name from group_id when not on a group page?’ is closed to new replies.
Skip to toolbar