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(); ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.