Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #711693

    How do I change this feature of Enfold Google Maps

    <script type=”text/javascript” src=”https://maps.google.com/maps/api/js?v=3.24&key=******”></script&gt;

    to this

    <script type=”text/javascript” data-cfasync=”false” src=”https://maps.google.com/maps/api/js?v=3.24&key=******”></script&gt;

    #711708

    Hi web_kings!

    You will have to edit and modify the code, to the different areas we are using it.
    The best case scenario is to hire a freelancer, who will be able to help you.

    Thanks a lot

    Regards,
    Basilis

    #711729

    I can edit the code myself, It should just be a simple template hack. Was hoping you could just point out what template it was to save me time.

    #711740

    Hey!

    You can find it in enfold/config-templatebuilder/avia-shortcodes/google_maps.php, it should be in line 31-50:

    			function extra_assets()
    			{
    				if(is_admin() && isset($_POST['action']) && $_POST['action'] == "avia_ajax_av_google_map" )
    				{
    					$prefix  = is_ssl() ? "https" : "http";
    		            $api_key = avia_get_option('gmap_api');
    		            $api_url = $prefix.'://maps.google.com/maps/api/js?v=3.24';
    		            
    		            if($api_key != ""){
    			           $api_url .= "&key=" .$api_key;
    		            }
    		            
    		            wp_register_script( 'avia-google-maps-api', $api_url, array('jquery'), NULL, true);
    					
    					$load_google_map_api = apply_filters('avf_load_google_map_api', true, 'av_google_map');
    					            
    					if($load_google_map_api) wp_enqueue_script(  'avia-google-maps-api' );
    				}
    
    			}

    Hope this helps.

    Cheers!
    Nikko

    #711835

    Many thanks Nikko, much appreciated

    #711839

    Hey!

    Glad we could help :)

    Regards,
    Nikko

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