Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1291040
    auldreekie
    Participant

    I can’t get Google Maps to show up on my site.

    I’ve added custom code to my functions.php file:

    function my_add_frontend_scripts() {
      wp_register_script( 'vendor-google-maps', 'https://maps.googleapis.com/maps/api/js?key=xxx');
      wp_enqueue_script( 'vendor-google-maps' );
    }
    add_action('wp_enqueue_scripts', 'my_add_frontend_scripts', 100);

    I’ve disabled the Google Maps API in Ubermenu to avoid the known conflict. No success – Ubermenu still seems to be calling the Google Maps API in the code:

    <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?v=3&ver=4.7'></script>

    and I’m getting a multiple API error. Disabling Ubermenu completely has no effect.

    Adding the API key through Ubermenu and removing the custom code from functions.php has no effect – I get a missing API error.

    Help!

    #1291063
    Darshana
    Moderator

    Hi there,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1291165
    auldreekie
    Participant
    This reply has been marked as private.
    #1291229
    Christian
    Moderator

    Please give us the page where you’re having the issue. Your home page doesn’t have an error and no Google Maps code loaded in there.

    Thanks.

    #1291308
    auldreekie
    Participant
    This reply has been marked as private.
    #1291309
    auldreekie
    Participant
    This reply has been marked as private.
    #1291451
    Darshana
    Moderator
    This reply has been marked as private.
  • <script> jQuery(function($){ $("#no-reply-1291040 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>