Problem:
I want a user to register and to fill in to which company it belongs. The company is a custom post type. It may be a new company, or maybe already in the database. How do I connect the user to the company and the company has some taxonomies. When the user registers himself for the first time, I want it to select the taxonomie in the register form so if the company is new, it can be created with the right taxonomy. I know how I can make checkboxes but I want the register form to get the possible taxonomies from wordpress.
Solution:
Since wordpress users are not a custom post type, so you can not connect user with custom post type "Company" directly, and custom taxonomy does not support WordPress user.
in your case, I suggest you setup another custom post type, for example "Member", use it as intermediate between "company" and user:
1) Each user can create only one post in "Member" post type
2) setup one-to-many relationship between post type "Company" and "Member"
3) After user login into your website, display a page with post view, lists all "Company" posts,
If user can find his own company, show a child post form link to create "Member" post.
If his company is not in company list, show a post form for creating "Company" post.
Relevant Documentation:
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 2 replies, has 2 voices.
Last updated by 5 years, 9 months ago.
Assisted by: Luo Yang.