Home › Forums › ACF PRO › Google maps API included multiple times › Reply To: Google maps API included multiple times
You can try to override the ACF settings for “enqueue_google_maps”=false for it to not load the script in the frontend. Also, I’ve added is_admin() check just to be sure that it only trigger the override on front-end.
function my_acf_init() {
if(is_admin()):
return;
endif;
acf_update_setting('enqueue_google_maps', false);
}
add_action('acf/init', 'my_acf_init');
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.