BuddyPress Group-O-Matic: Adding members to groups based on profile fields!

Basic_Group_O_Matic_Example

I think it’s safe to say that the Groups Component in BuddyPress is the most powerful component within BuddyPress. There are countless plugins available that extend the groups component, and I use Groups for pretty much every BuddyPress project I do. What has been missing though, is a flexible and powerful solution for BuddyPress site owners to streamline the group joining process.

For lots of communities you want to add your members to groups as soon as they sign-up for your site. Or maybe you want to put extra focus on certain groups because they are crucial to your community. BuddyPress Group-O-Matic is the newest plugin we (PressCrew) developed for BuddyPress communities and offers site administrators some really powerful ways to achieve exactly this.

So what does the BuddyPress Group-O-Matic Plugin do?

In a nutshell it adds a new set of options to the BuddyPress Profile Fields screen that allows you to put your members in groups based on the selection or answer they have given for that field.

Sounds cool… How do I set it up?

Good question! Let’s start with the basics!

Download BuddyPress Group-O-Matic from the plugin repository

1: Create your super duper xProfile field

For this example we’ll pretend that we have a community based around the movie director Guy Ritchie, and we want to put our members into the group that corresponds to their favorite Guy Ritchie movie.

So we’ll create a new xprofile field in the BuddyPress profile field screen in our WP Admin.

Choose your favorite movie using the Dropdown field below
* Snatch
* Sherlock Holmes

You’ll probably already notice the new BuddyPress Group-O-Matic box below, but don’t touch that yet. We’ll get to that later! You should have something like this (click the image for full size)

Screen Shot 2012 03 07 at 2.33.14 PM 300x233 BuddyPress Group O Matic: Adding members to groups based on profile fields!

2: Create your super duper Groups

Now that we’ve created our possible selections, we’ll create the groups using the exact name* as we’ve named our profile field selection options. For our example we’ll create a group called  ”Sherlock Holmes” and a group called “Snatch”. Like this:

Screen Shot 2012 03 07 at 2.50.57 PM 300x182 BuddyPress Group O Matic: Adding members to groups based on profile fields!

As stated before, make sure your group name matches exactly.

3: Use Group-O-Matic magic to link them together

Go back to your “Favorite Movie” profile field you created in step 1. It’s time to set up the Group-O-Matic box at the bottom of the screen. Here’s all you need to do:

Free Group O Matic BuddyPress Group O Matic: Adding members to groups based on profile fields!

So what does this stuff mean? In plain English this is what we’ve done:

“See if the Group Name (Attribute) has the exact name as the answer that has been given by your members (Pattern). Then automatically join the user to this group.”

If you’ve ever looked at your WordPress Permalinks or the WordPress SEO plugin by Yoast, you’ll see that Group-O-Matic lets you put in some funny looking code in the “Pattern” box. Don’t get confused, the %answer% input just lets Group-O-Matic know you want to use to the exact answer given by your users, and let Group-O-Matic put the user in the group with that name. Because we’ve given our profile dropdown options and our group names exactly the same name, this works great.

Marshall (the plugin author) has also made a quick video guiding you through this process.

Note: The Premium version of Group-O-Matic gives you much more flexibility in this aspect. You can use wildcard matching so your profile fields and groups names do not have to match exactly. This is great for when you have groups with weird names or slugs. For example your group could be named “Snatch Movie Fan Club” and your profile field option could just be called “Snatch”.

Check out the brilliantly designed screenshot mock-up below (ahem!)

Basic Group O Matic Example 1024x487 BuddyPress Group O Matic: Adding members to groups based on profile fields!

Awesome right?! You’ve now mapped a profile field to a BuddyPress Group. Every member that goes through the registration process will now automatically be put in the group based on that xProfile field selection. You can do this for multiple profile fields and have fine grained control over your community. Some ideas for profile/group mapping;

  • Language
  • School
  • Department
  • Age range
  • Skill Level
The possibilities are pretty much endless!

Stay tuned for another tutorial related to BuddyPress Group-O-Matic Pro

In the next tutorial we’ll take a look at how you can force your users to select a certain group after they’ve registered for your community, and how you can add the Group activity as a main Activity Stream Tab. This is all done with the Pro version of the plugin which is available in the PressCrew shop. Check out the screenshot below for a preview of showing Group Activity under a Activity Stream tab:

Screen Shot 2012 07 05 at 1.05.07 PM BuddyPress Group O Matic: Adding members to groups based on profile fields!

Check out BuddyPress Group-O-Matic Pro

BuddyPress Hosting Guide Looking for quality BuddyPress hosting? We will guide you through all the available hosting options and help you find the best webhost for your next BuddyPress project!

Something about bowe

BuddyPress fanatic, WordPress Theme designer and MultiSite community builder. Proud co-founder of PressCrew. Loves to use awesome in every sentence. Often described as a Dutch Treehugging Hippie.

4 Responses to BuddyPress Group-O-Matic: Adding members to groups based on profile fields!

  1. Brajesh July 5, 2012 at 6:53 pm #

    awesome. Nice work Bowe :)
    It reminds me one of the plugin I created which allows to automatically join groups based on what user posts to the activity.
    Looking forward to see more from PressCrew :)

    Reply
    • bowe July 6, 2012 at 10:40 am #

      Thanks Brajesh!

      That sounds like an awesome plugin.. how does it work in practice? Is it based on keywords or something?

      Reply
  2. akaoshi1 February 8, 2013 at 4:57 pm #

    Hi i was just wondering can i use Group-O-Matic Pro, for user profile for example user mast completle they profile and select the group they wish to join if they skip it or trys to they will get a error message saying please completely your profile, pretty much the same as you have demonstrate on your video, I just need to know if i can use for user profile as well?

    Reply
    • bowe February 10, 2013 at 4:00 pm #

      Yes this is possible! You can force a certain profile field to be filled in. If the user does not do this he will be redirected to their “Edit Profile” screen and will not be able to access the site :-)

      Reply

Leave a Reply