Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get group_name from group_id when not on a group page?


  • joshkadis
    Member

    @joshkadis

    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)

  • rich! @ etiviti
    Participant

    @nuprn1

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


    Anonymous User 96400
    Inactive

    @anonymized-96400

    Something like this will work as well:

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


    joshkadis
    Member

    @joshkadis

    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