Hello guys,
I have small issue with diplaying of Google Map in acf_form(); (ACF frontend form)
ACF Google Maps works me very good in backend but I can display Google Map correctly in frontend (and enable to users to select point in the map).
Here is the form: https://pfp.ad13.cz/new-point/
Here are displayed my custom post types: https://pfp.ad13.cz/relax-advisor/
<?php /* Template Name: Add Page Template */ get_header(); ?>
<div id=”content”>
<?php acf_form_head(); ?>
<div class=”container”>
<div class=”row”>
<div class=”col-sm-12″>
<?php acf_form(array( ‘post_id’=> ‘new_post’, ‘post_title’ => true, ‘post_content’ => true, ‘new_post’ => array( ‘post_type’ => ‘place’, ‘post_status’ => ‘draft’ ) )); ?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
Thank you very much in advance.
Jan
acf_form_head()
must be called before get_header()
Dear John,
thank you very much. I moved acf_form_head()
before get_header()
.
But map still doen’t work. Do you have any idea please?
Than you very much!
<?php acf_form_head(); ?>
<?php
/*
Template Name: Add Page Template
*/
get_header();
?>
<div id="content">
<div class="container">
<div class="row">
<div class="col-sm-12">
<?php get_the_title(); ?>
<?php
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile; // End of the loop.
?>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-12">
<?php
acf_form(array(
'post_id' => 'new_post',
'post_title' => true,
'post_content' => true,
'new_post' => array(
'post_type' => 'place',
'post_status' => 'draft'
)
));
?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
Sorry I didn’t get back here sooner.
What version of ACF are you using?