Hi,
I'm creating a real estate website in which hosts register them, add properties and then they can edit them.
I can't add the link to the author page where they can find the list of their properties.
I'm using this code o create host pages.
add_action('cred_save_data', 'crea_proprietario',10,2);
function crea_proprietario($post_id, $form_data)
{
if ($form_data['id']==43) // replace with your form's ID
{
// Create new entry after registration.
$my_post = array(
'post_title' => $_POST['wpcf-ragione-sociale'],
'post_content' => '',
'post_status' => 'publish',
'post_author' => $post_id, // adjust post_author if/as required
'post_type' => 'proprietario' // replace with the slug of your post type
);
// Insert the post into the database
wp_insert_post( $my_post );
}
}
It works fine and it creates pages with Ragione Sociale filed as a title.
How can I add in host private area a link o that page? I tried with a view with a conditional field with the check of author id but it doesn't work. There is another solution I can try?
Thank you so much.
My issue is resolved now. Thank you!