Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Disable Google Maps
New Landing › How can we help? › Cardinal › Disable Google Maps
- This topic has 11 replies, 5 voices, and was last updated 10 years by Kyle – SUPPORT.
-
Posted in: Cardinal
-
July 31, 2014 at 3:29 pm #96547
where can i disable google maps? i do not use it, and it is taking nearly 3 seconds to load
July 31, 2014 at 3:54 pm #96561Hi
Not sure what you are referring to? If you do not have a Google map on the page then there will be nothing to load?
– Kyle
July 31, 2014 at 3:58 pm #96563the theme is still requesting the google map api
July 31, 2014 at 10:22 pm #96637Hi,
Maybe it’s from any additional plugin that you have installed. try to deactivate all plugins to see if it still loads google maps. Or activate the default WordPress theme without deactivating the plugins.
We only load google maps when you using a Directory asset from the page builder.
– Rui
August 1, 2014 at 8:44 pm #96967/cardinal/functions.php seems to suggest otherwise – my guess is that i just need to change ‘TRUE’ TO ‘FALSE’
/* LOAD FRONTEND SCRIPTS
================================================== */
if (!function_exists(‘sf_enqueue_scripts’)) {
function sf_enqueue_scripts() {// Variables
global $sf_options;
$enable_rtl = $sf_options[‘enable_rtl’];
$enable_min_scripts = $sf_options[‘enable_min_scripts’];
$post_type = get_query_var(‘post_type’);// Register Scripts
wp_register_script(‘sf-bootstrap-js’, SF_LOCAL_PATH . ‘/js/bootstrap.min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-flexslider’, SF_LOCAL_PATH . ‘/js/jquery.flexslider-min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-flexslider-rtl’, SF_LOCAL_PATH . ‘/js/jquery.flexslider-rtl-min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-isotope’, SF_LOCAL_PATH . ‘/js/jquery.isotope.min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-imagesLoaded’, SF_LOCAL_PATH . ‘/js/imagesloaded.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-owlcarousel’, SF_LOCAL_PATH . ‘/js/owl.carousel.min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-jquery-ui’, SF_LOCAL_PATH . ‘/js/jquery-ui-1.10.2.custom.min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-ilightbox’, SF_LOCAL_PATH . ‘/js/ilightbox.min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-maps’, ‘//maps.google.com/maps/api/js?sensor=false’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-elevatezoom’, SF_LOCAL_PATH . ‘/js/jquery.elevateZoom.min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-infinite-scroll’, SF_LOCAL_PATH . ‘/js/jquery.infinitescroll.min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-theme-scripts’, SF_LOCAL_PATH . ‘/js/theme-scripts.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-theme-scripts-min’, SF_LOCAL_PATH . ‘/js/sf-scripts.min.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-functions’, SF_LOCAL_PATH . ‘/js/functions.js’, ‘jquery’, NULL, TRUE);
wp_register_script(‘sf-functions-min’, SF_LOCAL_PATH . ‘/js/functions.min.js’, ‘jquery’, NULL, TRUE);August 3, 2014 at 12:03 am #97087Hi @icecast,
Best thing to do would be to add that function to your child theme, and then you can remove the scripts you don’t want to include.
Unfortunately Envato don’t allow us to use script include methods which would allow us to output only the scripts needed, so we have to include all.
FYI – 3 seconds to load is much longer than it should take. I.e. our demo sites usually loads completely in < 1-2 seconds.. - Ed
August 4, 2014 at 11:17 am #97386thanks, i commented out google maps, font-awesome, swift-slider, owl carousel, ilightbox, woo-commerce and gizmo
pagespeed score improved 10 points
August 4, 2014 at 11:18 am #97388Ok great!
– Kyle
September 24, 2014 at 5:47 pm #114177Hi Ed,
I’m having the same issue, and want to increase my Google speed ranking by deactivating the scripts I don’t use, could you please let me know what these scripts do(so I can decide which ones to remove), and how exactly I can place a code in the function.php of my child theme to prevent them from loading?/js/jquery.flexslider-min.js
(I only use RevSlider and the built in one for gallery short-codes, do I need this?)/js/jquery.isotope.min.js
/js/jquery.carouFredSel.min.js
/js/jquery.fitvids.js
/js/jquery.elevateZoom.min.js
http://maps.google.com/maps/api/js?sensor=false
(I’m sure I definitely won’t use Google Maps on site, so I need this to be removed.)Thanks
SiaSeptember 25, 2014 at 4:11 am #114288Hi Sia,
/js/jquery.flexslider-min.js
This is any slider which isn’t revolution slider/js/jquery.isotope.min.js
This powers the masonry layouts/js/jquery.carouFredSel.min.js
This is far carousel assets/js/jquery.fitvids.js
This is for responsive videos./js/jquery.elevateZoom.min.js
This is for product image zoom on product detail pageHope that helps.
– Ed
September 25, 2014 at 8:24 am #114344Thanks for the info Ed,
so I only need to copy the exact function into function.php of the child theme and then delete the lines I don’t need?September 25, 2014 at 9:18 am #114362Yes or you could comment them out 🙂
– Kyle
-
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.