Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1011886

    Hi,
    We have problem with google maps – for development only. We have API key and some code we added to last row in function.php, but we have same problem with it.
    Can you help me, please ? We have WordPress 4.4.2 and Enfold theme without input for past API code.

    This code we added to last row in function.php.

    // Add scripts to wp_head()
    function child_theme_head_script() { ?>
    <script id=’avia_gmaps_framework_globals’ type=’text/javascript’>
    /* <![CDATA[ */
    var avia_framework_globals = avia_framework_globals || {};
    avia_framework_globals.gmap_api = ‘AIzaSyBP0fL4IzWwXEZB648iv2I5FUS5D4LdG8Q’;
    avia_framework_globals.gmap_maps_loaded = ‘https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBP0fL4IzWwXEZB648iv2I5FUS5D4LdG8Q&callback=aviaOnGoogleMapsLoaded’;
    avia_framework_globals.gmap_builder_maps_loaded = ‘https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBP0fL4IzWwXEZB648iv2I5FUS5D4LdG8Q&callback=av_builder_maps_loaded’;
    avia_framework_globals.gmap_backend_maps_loaded = ‘https://maps.googleapis.com/maps/api/js?v=3.30&callback=av_backend_maps_loaded’;
    avia_framework_globals.gmap_source = ‘https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBP0fL4IzWwXEZB648iv2I5FUS5D4LdG8Q’;
    avia_framework_globals.gmap_avia_api = ‘http://www.fusteriahenares.com/wp-content/themes/enfold/framework/js/conditional_load/avia_google_maps_api.js’;
    /* ]]> */
    </script>
    <?php }
    add_action( ‘wp_head’, ‘child_theme_head_script’ );

    Thanks a lot.
    Regards Lukas.

    #1012102

    Hey Luks,

    I’m not sure exactly what that code is supposed to do, but you are running very old versions of both WordPress and the theme. Could you try updating both of them please? After that then maybe you could try to use the theme map functionality instead? https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#theme-update

    Best regards,
    Rikard

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.