[Resolved] Groups

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.

This topic contains 4 replies, has 2 voices.

Last updated by Oniromancer 2 months ago.

Assigned support staff: 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

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

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

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

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!