Skip Navigation

[Resolved] Workshop – users as post type ?

This support ticket is created 7 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
- 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 6 replies, has 2 voices.

Last updated by FedericoI4663 7 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#404512
Event-User.jpg

I need to build a many to many relationship between Events (workshops) , speakers and participants. Most of speakers and participants are WP users. There is any way to create a post type, ready for Parent / Children relationship using the users list?

In other words, if i create a Participants Post type i have to enter manually a duplicate of existing users in order to create a Parent / Children relationship with Events Post type ?
I can't relay only on users subscriptions, i need also the option to attach by form a number of them to a workshop.

I created a PostType Event-Author but adding one by one this Post Type to create relationship is not very convenient.

Could you please help?
Many thanks - Federico

#404636

Dear Federico,

There is built-in Many-to-Many relationships in Types plugin, please check our document:
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
Creating and Displaying Many-to-Many Post Relationships

#404648
Event-WPUser.jpg

Dear Luo,

thanks for your reply, i read the article but in the example the relationship is between bands, events and appearances, that are all Post types.
What i am looking for is a way to replace , let's say, bands with WP users.

I know that a logged user can subscribe an event, what i need is a form where an operator could associate users to events smoothly. Basically a way to build a combobox displaying users and use it
in the Relationship form (see image attached)

Many thanks,
Federico

#404962

I assume we are talking about this:
You are going to setup many to many relationships between Post type "Events" and wordpress users
There isn't such a built-in feature within Types plugin.

But there is a workaround:
You can create a custom multiple instance select field, use Types filter hook wpt_field_options to populate the options as the wordpress users, for example this thread:
https://wordpress.org/support/topic/user-select-field

For your reference

#405077

Dear Luo,

sounds interesting!

Could you please clarify: so i should add an hook in functions.php based on https://wordpress.org/support/topic/user-select-field , then should i create a User fields group with a multiple instance select field?

And how can i call the hook from the custom multiple instance select field ?
I read here https://toolset.com/documentation/user-guides/using-custom-fields/ but it is not explained

Could you suggest some documentation to follow?

Many thanks,
Federico

#405301

I tested it in my localhost, there isn't multiple instance option for custom select field.
But in your case, you need multiple instance fields. so I suggest you try this:
1) Create tow custom post types: speakers and participants
Setup each speakers and participants post's author as different wordpress user.

2) setup many-to-many relationships between post types:
Events and speakers
Events and participants
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/

3) In the single Event post, display the related speakers and participants, see above document, section "Displaying Many-to-Many Relationships Using Views",
display the wordpress user information with Views shortcode [wpv-post-author]
https://toolset.com/documentation/views-shortcodes/#wpv-post-author

Hope it help

#409978

Many thanks , i finally simplified my model and decided to use the Author of the post in a standard way.

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