Skip Navigation

[Gelöst] Populate Custom User Field with CPT

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created vor 8 Jahre, 1 Monat. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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 1 Antwort, has 2 Stimmen.

Last updated by Shane vor 8 Jahre, 1 Monat.

Assisted by: Shane.

Author
Artikel
#378065
screen3.jpg
screen2.jpg
screen1.jpg

I have created a Custom User Field (select field) called "Company"

I need to be able to assign each WordPress user account with a client's company. See screenshot 1 below.

I have a Custom Post Type called Customer Accounts, where the title of the CPT is the name of the company.

I need to auto-populate the select field in the User Profile with the titles of the CPT field (company names), so that as new records are added to the Customer Accounts page, the company names automatically appear in the user field select group.

#378133

Shane
Supporter

Languages: Englisch (English )

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

Hi Rob,

Thank you for contacting our support forum.

Unfortunately this is not possible as wordpress does not support a relationship between post types and users like this .

The only relationship that is supported is through the user being the author.

What you can do is to allow the user to create an account profile on a custom post type called User Profile and from here the User Profile account can be a child of Company.

Then you can setup a view to display the Profile of a specific user and with this you can get the company that the profile is a child of.

Please let me know if this helps.
Thanks,
Shane

Das Forum „Types Community Support“ ist für neue Themen und Antworten geschlossen.

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