Skip Navigation

[Resolved] Relationship between Custom Posts and Users

This support ticket is created 3 years, 3 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by igorL-3 3 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#2183703

Tell us what you are trying to do?

I want to be able to link Custom Posts with Users. For example Say Meeting Minutes is the Custom Post and I want to link attendees who are users.

Is there any documentation that you are following?

I found this: https://toolset.com/forums/topic/connect-users-with-diffrent-role-to-custom-post-type/
there is a reference of this functionality being avaliable in types 3.0. It's now 3.4.11 but I can't find how to do this

Is there a similar example that we can see?

What is the link to your site?

#2183855

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Igor,

Thank you for getting in touch.

Unfortunately no this is not possible. The main issue here is that wordpress core doesn't support connecting users into relationships with Posts in the traditional sense.

This is due to the users already being in a relationship with the posts by being the author of that posts.

Thanks,
Shane

#2183963

Is there a possible work around anyone has come up with. Writing a custom PHP function etc...?

#2184043

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Igor,

There isn't any coded workaround either as mentioned wordpress core itself doesn't support this. If a solution would be made it would involved Database modifications and the use of custom tables to hold the relational information.

You can get around this by allowing the user to create a profile post then relating that profile post to another post type.

This is the only what that it can work.

Thanks,
Shane

#2184065

Do you have a link to an example of this sort of scheme?

#2184111

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Igor,

We don't have a specific documentation that shows exactly what you want to achieve, however we do have something similar.
https://toolset.com/documentation/legacy-features/views-plugin/how-to-create-custom-searches-and-relationships-for-users/#support-for-users-in-toolset-and-wordpress

This document should be able to guide you through the concepts of having the user profile post type and relating it to other post types.

Please let me know if this helps.
Thanks,
Shane

#2184113

My issue is resolved now. Thank you!