Title: Display groups name by user
Last modified: September 1, 2016

---

# Display groups name by user

 *  Resolved [facem Web](https://wordpress.org/support/users/shojikama/)
 * (@shojikama)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/display-groups-name-by-user/)
 * Hi,
 * I’m creating a list of users with name, avatar, etc .. and I would like to display
   the groups name. Is there some “get_groups_name($user->ID);” function ?
 * Thanks
 * [https://wordpress.org/plugins/groups/](https://wordpress.org/plugins/groups/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kento](https://wordpress.org/support/users/proaktion/)
 * (@proaktion)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/display-groups-name-by-user/#post-7500529)
 * Hi,
 * From [http://docs.itthinx.com/document/groups/api/examples/](http://docs.itthinx.com/document/groups/api/examples/):
 *     ```
       $groups_user = new Groups_User( get_current_user_id() );
       // get group objects
       $user_groups = $groups_user->groups;
       ```
   
 * And then you can do:
 *     ```
       foreach ($user_groups as $group) {
           $foo = $group->name;
           ...
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Display groups name by user’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups - Memberships and Access Control](https://wordpress.org/plugins/groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/groups/)
 * [Active Topics](https://wordpress.org/support/plugin/groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/groups/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kento](https://wordpress.org/support/users/proaktion/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/display-groups-name-by-user/#post-7500529)
 * Status: resolved