Support

Account

Home Forums Front-end Issues Front End Form – Gallery Bug Reply To: Front End Form – Gallery Bug

  • 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(); ?>