This reply has been marked as private.
Also: it is not clear if i can create a new post or edit only is allowed. Sorry for multiple posting
This is the code of my page.
<?php
acf_form_head();
if( !is_user_logged_in() ){
header("Location:" . home_url());
}
$post_id = NULL;
if( !empty($_POST['recipe_id']) and is_numeric($_POST['recipe_id']) ){
$post_id = $_POST['recipe_id'];
}
$acf_options = array(
'field_groups' => array(5),
'return' => get_permalink(),
'submit_value' => __('Inoltra', 'ricette')
);
if( $post_id ){
$acf_options['post_id'] = $post_id;
}
?>
<?php get_header(); ?>
<div id="edit-recipe" class="content">
<?php
acf_form($acf_options);
?>
</div>
<?php get_footer(); ?>