I’am getting the id of a group using:
$group = groups_get_group( array( 'group_id' => $id) );
But for the life of me I can’t figure out how to return the link to the group its self.
I can grab the slug, but some groups are sub groups so I can’t just:
echo 'domain/groups/'.$group->slug;
Any help greatly appreciated.
Did you try:
That will return the href value for the group.
To get an html link use:
For anyone still needing the answer to why bp_get_group_permalink( $group ); doesn’t work with just the group id, its because you need to create a Buddypress Group Object. Something like this: