How can I set a Post that is submitted with CRED, to be child to the Post, where the Form is inserted?
I also need to update it's title with a value coming from a Post Field
You will use a Custom CRED API (cred_save_data) and Wordpress API (mainly get_ and update_post_meta) to achieve this
You will put the function created into your Theme's functions.php
In the Code, you will:
get_post_meta the field's value with which you want to update your Post title
wp_update_post the title with the above value
You must note that the parent post ID in this case will be the ID of the Post where you show the CRED, and this is stored in the CRED API $form_data['container_id'];
With this value you update the posts hidden field _wpcf_belongs_parent-post-slug_id
A good example is visible there:
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.
|-||-||14:00 – 20:00||14:00 – 20:00||14:00 – 20:00||14:00 – 20:00||14:00 – 20:00|
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)