Title: custom loop based on user group
Last modified: August 31, 2016

---

# custom loop based on user group

 *  Resolved [gatta2](https://wordpress.org/support/users/gatta2/)
 * (@gatta2)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/custom-loop-based-on-user-group/)
 * Hi, is it possible to show different loop to users based on the group they are
   in?
 * [https://wordpress.org/plugins/groups/](https://wordpress.org/plugins/groups/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Kento](https://wordpress.org/support/users/proaktion/)
 * (@proaktion)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/custom-loop-based-on-user-group/#post-7000519)
 * Hi,
 * Yes that’s possible, you can check if the current user belongs to a group and
   use a different execution path based on that. See [http://docs.itthinx.com/document/groups/api/examples/](http://docs.itthinx.com/document/groups/api/examples/)
   for examples under “Does the current user belong to the Foobar group?”.
 * Cheers
 *  [Edmund](https://wordpress.org/support/users/animo94/)
 * (@animo94)
 * [10 years ago](https://wordpress.org/support/topic/custom-loop-based-on-user-group/#post-7000570)
 * I have been looking at this snippet to possibly solve my predicament. Unfortunately,
   I am relatively new to wordpress; even more to php and is completely loss on 
   how to use or where to insert it.
 * I would like to use the snippet described above to check if a user belongs to
   a group(sign-in) if they are not then it will assume that the user is logged-
   out. If the user is logged-out, All product category in my shop should be visible.
   I apologize in advance if this might sound elementary, but have been working 
   on this for days and have not found a solution.
 * Will appreciate all the help. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘custom loop based on user group’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups](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/)

 * 2 replies
 * 3 participants
 * Last reply from: [Edmund](https://wordpress.org/support/users/animo94/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/custom-loop-based-on-user-group/#post-7000570)
 * Status: resolved