Skip Navigation

[Resolved] Groups

This thread is resolved. Here is a description of the problem and solution.

Problem:

I'm trying to replicate groups with Toolset, similar to the ones of buddypress.

So a user can create a group CPT, make it private or public, join request, and then only users who were granted access can navigate the group.

Solution:

It needs to setup many-to-many relationship between WordPress user and post type "group", for example:

- One user can connect with multiple "group" posts

- One "group" post can connect with multiple WordPress users

Since Toolset relationship is based on post types, you can try with a intermetiate post type, for example:

https://toolset.com/forums/topic/groups/#post-1602025

Relevant Documentation:

https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

This support ticket is created 3 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Oniromancer 3 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1600893

Hi,

I'm trying to replicate groups with Toolset, similar to the ones of buddypress.
So a user can create a group CPT, make it private or public, join request, and then only users who were granted access can navigate the group.

Thank you.

#1602025

Hello,

I assume you are going to setup many-to-many relationship between WordPress user and post type "group", for example:
- One user can connect with multiple "group" posts
- One "group" post can connect with multiple WordPress users

Since Toolset relationship is based on post types, you can try with a intermetiate post type, for example:
1) Setup a custom post type "Member":
Each "Member" post's author is different WordPress user, each WordPress user can have only one "Member" post
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/#how-do-i-prevent-users-from-creating-more-than-one-contractor-post

2) Setup many-to-many relationship between post types "Member" and "group"

3) In single "group" post, display a relationship form, so user can connect his "Member" post with "group" post
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/

More help:
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

#1605947

Hi,
it's not possible to use user_meta (custom user field)?

#1606479

There isn't such kind of built-in feature with custom user field, and it will require custom codes, and might conduct other unexpected result. So I suggest you try with the intermetiate post type as I mentioned above:
https://toolset.com/forums/topic/groups/#post-1602025

#1606809

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.