Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #1146796

    We’re using a Google Maps field from Advanced Custom Fields to select a location when creating a new post (custom post type).
    The suggestions for an address don’t show up when using Enfold. We’re using an Enfold child theme, but the error persists when switching to Enfold. Works just fine when changing to twentynineteen theme.
    WP version is 5.2.3 and Enfold is

    Any ideas to what may cause this?


    Hey forde,

    Thank you for the inquiry.

    The theme’s map scripts are probably in conflict with the plugin’s. Where can we see the issue?

    You can disable the theme’s map element from the Enfold > Performance > Disable Template Builder Elements panel. Set the “Disabling of template builder elements” to the third option, then check the “Google Map Element” to disable it. Or use the “avf_load_google_map_api_prohibited” filter to prevent the map scripts from loading.

    Best regards,


    Thank you for your reply, unfortunately I had no success disabling the theme’s map element. I tried both methods you described.

    The problem is occuring in the back-end when we’re creating a new post with a custom post type.

    I used a command from ACF’s javascript library, ‘ acf.isset(google, ‘maps’, ‘places’, ‘Autocomplete’) ‘,
    which returned false when Enfold is activated – meaning Autocomplete is not activated. Same command returns true when twentynineteen is active). Somehow Enfold is turning off the autocomplete.

    No message about any javascript conflicts, if I manually enter the address and press the search button the marker is placed at the correct location (this is probably not the Autocomplete API though).
    All APIs are activated for this project in the Google Cloud Platform Console



    We are not really sure how you are using the scripts. Can you give us a link to the documentation? It would be wise to contact the plugin authors for additional help.

    Best regards,


    I too am having the exact same issue. It was working before but seems to have stopped.

    If I remove the api key from enfold settings, the backend ACF map does not load.

    I have tried both methods in my child’s functions.php from here:

    The map will not show at all if Enfold does not have it’s API field filled in.

    I tried switching to twenty nineteen, checked the edit post and I got the google maps cannot load message, then I added the exact same code I added to my enfold child functions.php to the functions.php in twenty nineteen, went back to post edit the map loads and suggestions come in.

    This means to me that enfold is ignoring the ACF inclusion completely and only counting it’s own.

    I have even tried the disabling the enfold maps as described here:

    But this does not work either, it still behaves the exact same way, even with this disable maps script, if I pop the API key into Enfolds settings, it loads a map but no autocomplete, I take it away, I get nothing. I have been running around in circles for 2 days on this now.

    I would really appreciate some help.



    Thank you for following up.

    Do you see any errors in the console when you’re on the ACF map interface or settings? It is possible that the map API is loaded twice. If that is the case, then you can use the following snippet to disable any map related scripts added by the theme.

    add_filter('avf_gmap_vars', 'avf_gmap_vars_disable', 10, 1); 
    function avf_gmap_vars_disable($map) {
    	$map = null;
    	return $map;
    add_filter('avf_load_google_map_api_prohibited', 'avf_load_google_map_api_prohibited_true', 10, 1);
    function avf_load_google_map_api_prohibited_true($prohibited) {
    	if( is_admin() ) $prohibited = true;
    	return $prohibited;
    add_action('init', 'ava_deregister_gmaps', 9999);
    function ava_deregister_gmaps() {
    	if(is_admin()) {
    		wp_deregister_script( 'avia-google-maps-api' );
    		wp_deregister_script( 'avia_google_maps_front_script' );
    		wp_deregister_script( 'avia_google_maps_api_script' );
    		wp_deregister_script( 'avia_google_maps_widget_admin_script' );

    You can also try this filter.

    add_filter( 'avf_load_google_map_api', '__return_false' );

    Best regards,


    No errors in the console.

    The third function (ava_deregister_gmaps) you suggested fixed the problem. Thank you for the help.


    Confirmed! (ava_deregister_gmaps) sorted it for me too.



    Hi dannhanks,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.