Re: How to get group info by id outside of the loop
I needed to do this recently too… this is the technique I used:
$group = groups_get_group( array( ‘group_id’ => $group_id ) );
Found on http://bluemandala.com/buddypress-plugin/127/buddypress-get-group-details-from-group_id/
So in order to get the link to your groups try something like this
global $bp;
$group = groups_get_group( array( ‘group_id’ => $group_id ) );
home_url( $bp->groups->slug . ‘/’ . $group -> slug )