Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Get group_name from group_id when not on a group page? (4 posts)

Started 1 year, 6 months ago by: joshkadis

  • Profile picture of joshkadis joshkadis said 1 year, 6 months ago:

    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.

  • Profile picture of rich! @ etiviti rich! @ etiviti said 1 year, 6 months ago:

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

  • Profile picture of Travel-Junkie Travel-Junkie said 1 year, 6 months ago:

    Something like this will work as well:

    $group = new BP_Groups_Group( $group_id );
    return $group->name;
  • Profile picture of joshkadis joshkadis said 1 year, 6 months ago:

    awesome, thanks!