Skip Navigation

[Resolved] Post Types pulled through to user Profiles

This support ticket is created 2 years, 2 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/Karachi (GMT+05:00)

Author
Posts
#2470073

Hello,

We have 2 post types
Locations
Companies

Is it possible to pull these through as an option to select from on a user profile?
User profile registration form
User profile edit
Display on user profile account page

Thanks

#2470355

Hi,

Thank you for contacting us and I'd be happy to assist.

Can you please share the links to pages where these profile forms and the account page can be seen?
( I still have the website's access details from the last ticket )

I'll be in a better position to suggest the next steps, accordingly.

regards,
Waqar

#2471845

Thank you for sharing these details.

If I understand correctly, you currently have these 3 post types:
- Companies
- Locations
- Based in

And you'd like to have the ability that through the Toolset's user forms (for registration and editing user profile), each user can select one of the posts from each of these 3 post types for linking.

If that is correct, you can add 3 separate select-type user custom fields; Companies, Locations and Based in.

The options of these custom fields can then be programmatically populated using the "wpt_field_options" filter, from the relevant custom post types:
https://toolset.com/documentation/programmer-reference/types-api-filters/#wpt_field_options

You'll find a relevant example code snippet in this forum thread:
https://toolset.com/forums/topic/programmatically-add-options-to-select-custom-field-with-a-filter/#post-2320285

I hope this helps and please let me know if you need any further assistance with this.

#2471957

Great! My issue is resolved now. Thank you!