Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1035999

    ehsd
    Participant

    Is there a way to disable the Google Maps API call? I don’t use the google maps shortcode function and it just adds additional requests.

    Thanks!

    #1036556

    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    Google maps resource will not load if you’re not using it. It could be from other sources, would you mind providing your site’s URL that has this issue?

    Thanks!

    #1040237

    ehsd
    Participant

    ehsd.org

    I’m not using google maps anywhere on the site.The site does use Slider revolution (homepage only) and Google Tag Manager/Google Analytics. Not sure if GA uses the maps API.

    #1040779

    Rupok
    Member

    Hi there,

    Thanks for updating You can add the following code to your Child Theme‘s functions.php :

    add_action( 'wp_print_scripts', 'de_script_maps', 99999 );
    
    function de_script_maps() {
    	wp_deregister_script( 'vendor-google-maps', 'https://maps.googleapis.com/maps/api/js' );
    	wp_dequeue_script( 'vendor-google-maps' );
    }

    Hope this helps.

    Cheers!

    #1043935

    ehsd
    Participant

    I found the culprit. It was Ubermenu’s option to load the Google Maps API. it is found in the UberMenu settings under General Settings>Assets>Load Goggle Maps API.

    There were others seeing Google Maps API key errors in the console and someone mentioned the option in UberMenu here:
    https://www.facebook.com/groups/xthemeusers/permalink/610782859098125/?comment_id=610868992422845&reply_comment_id=611150665728011&notif_t=group_comment_mention&notif_id=1466013231613806

    I couldn’t see what was calling it and forgot UberMenu supports maps in the menu since I don’t use it. I’ll leave this here for others who might be searching the support threads.

    Cheers!

    #1043941

    Rahul
    Moderator

    Glad it worked out for you. Thank you for letting us know 🙂

    #1066647

    weareobeo
    Participant

    Just debugged my WP Google Maps issue, it was the UberMenu plugin! Thanks ehsd.

    #1066858

    Joao
    Moderator

    Great to hear it.

    Let us know if we can help you with antyhing else.

    Joao