Skip Navigation

[Resolved] Assign users to posts

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

Problem:
Can we somehow assign users to posts, as in a Post Relationship?

Solution:
No.
The only official connection is the authorship.
You can though mimic the Users in a Custom Post type, which you synchronize with Custom Code or manually, and then use this Post type as you like in relationships.

This support ticket is created 6 years, 10 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 replies, has 2 voices.

Last updated by Beda 6 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#617734

Hi. I want to set up a custom post type for storing "media appearances" of a company that will have multiple people attached to it.

How can I set it up to use already existing users of my websites instead of creating new taxonomy for people?

Sample custom post type: Media Appearances

Fields:

Type: Print / Radio / TV / Online
Channel name: [text]
Date:
Online link: URL
Employees featured: [multiple users]

#617867

It's not possible without Custom Code.

You would need to create a Select Field for example and then add the options with Custom Code to it.

It is also better to know first what you want to do with that information.
For example, if you want to search posts by those values, a field is enough.

If you want some sort of user Profiles linked to it, and search them as well, then you need a "User-Profile-Mimicking" post type, where you duplicate each user as a post as well.

It depends a lot what you want to do after.

Eventually, we can come up with some workaround if we know the final goal.

#617872

Hi Beda.

The situation is this: I'm building a website for an educational institution. The key here is faculty and staff members.

In this situation:

* Each teacher may teach multiple "courses"
* Each course may have multiple teachers
* Each teacher may appear on TV, radio, or print - "media appearance"
* Each teacher may attend multiple special "events" such as workshops or talks
* Each talk or "event" may be attended by multiple teachers

So, as you can see, it's a many-to-many relationship between teachers and other custom post types like "courses", "events", "media appearances", etc.

Does this make things more clear?

#618247

Yes.

I suggest waiting for the new Many To Many relationship features of Toolset, which are currently available as Beta versions on your Toolset Download Page.

It's not possible to make multiple connections between users and posts, but you can create a post type "Teacher" and connect that infinitely to other post types with the new features.

The stable version for this features is still to be released, but on a test site, you could see if it fits the needs of our project.

Otherwise, for learning systems, I would suggest more focused plugins like Sensei.