Skip Navigation

[Resolved] user relation to CPT

This support ticket is created 5 years, 12 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by rexJ-2 5 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1155384

Tell us what you are trying to do?
Hi, Have used toolset userform to create and update users. Works fine. Also custom posttype to users works fine.
But relationship between users and cpt is not doing what i want and seems that at the time no solution is working as i can see from other questions.
If there at the time are no relationship possible are there a workaround?

Question:
Can you give an example eventually a function,
1: how to trigger/create a new post when user are created. Tried

add_action('cred_before_save_data_512', 'before_save_data_for_form_with_id_512',10,1);

my toolset userform have the id 512.
Is there any documentation that you are following?
https://toolset.com/forums/topic/auto-populate-a-select-field/
https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_event_type
https://toolset.com/forums/topic/change-default-custom-post-title-from-auto-draft-to-something-else/#post-205318
Is there a similar example that we can see?
?
What is the link to your site?
hidden link

#1155465

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you can create post entry using the WordPress function - wp_insert_post:
=> https://developer.wordpress.org/reference/functions/wp_insert_post/

Please check following related ticket that may help you - where you need to adjust values for post_type etc..etc..:
=> https://toolset.com/forums/topic/automatic-post-creation-on-registration/#post-555243

#1160838

My issue is resolved now. Thank you!