Reply To: Display groups of connected member
Thank you for your reply.
Actually, I have a button “My group” and a none display bloc where I put this code, and a jquery shows all my groups on clic :
<?php
$group_ids = groups_get_user_groups(bp_displayed_user_id());
foreach($group_ids["groups"] as $group_id) {
echo('<a title="Aller sur le groupe" href="' . home_url() . '/groupes/' . groups_get_group(array( 'group_id' => $group_id )) -> slug . '">' .groups_get_group(array( 'group_id' => $group_id )) -> name . '</a>' . (end($group_ids["groups"]) == $group_id ? '' : ', ' ) ); }
?>
So this code is working on my profile page, I have all my groups. On a group page, only the group where I am shows, and everywhere else there is no list.
So do you have an idea to show a list of “my group” everywhere?
Thank you a lot !