Skip Navigation

[Resolved] Is There a Way to Assign More Than One User to a Specific Post?

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

Problem:
How to relate multiple users to posts?

Solution:
Post relationships are available only for posts. To connect users and posts using relationships you need to create a "profile" post that is tied to a user and use this profile in post relationships. This is described in the linked documentation.

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

This support ticket is created 6 years, 1 month 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Ed 6 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1170042

Ed

I want to add two users as "owners" of a specific post ("help request"); a user submitting a "help request" and a user providing a solution to that "help request".

Is that even possible?

#1170448

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Ed

You can create relationships with posts, but not with users. The only direct way to connect a user to a post is via the post author. Even if you used a plugin that lets you add multiple authors to a post, you wouldn't know which was which (the requester or the responder).

For custom searches involving users we propose a solution where you use user profile posts to mimic users so that they can be used in relationships, and that is probably the best solution here.

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

Otherwise you could add user custom fields for the requester and responder that stored the user ID, but you would then need to add a select dropdown for the user that you would have to populate via a View that output user display names and IDs in the required JSON format. (And this is only something you can do on front-end forms, not the back end).

Whatever you try, if you get stuck, let me know.

#1170475

Ed

Thanks, Nigel. I kinda knew I wasn't going to be able to do that. I think your solution (and the article you shared) will get me what I need. It actually makes more sense, this way.

Thanks, again!

#1170476

Ed

My issue is resolved now. Thank you!