New Landing How can we help? Themeforest Theme Support Joyn Google Maps – Sensor not required – Java scrip warning

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Joyn
  • #256734
    Jose
    Member
    Post count: 13

    Joyn theme is also getting this javascript warnings:

    Google Maps – Sensor not required – Java scrip warning

    Could you also fix it in this theme? Why is this script loaded if the site is not using maps at all?

    Thanks
    Jose

    #256744
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    In Joyn we don’t have yet a smart script detection to load it only in pages that use maps. That google warning it’s not problematic.

    -Rui

    #256755
    Jose
    Member
    Post count: 13

    Hi Nui, there is a way to safely disable the script for the whole site?

    While not problematic, hopefully it will be fix it in next versions 😉

    Thanks!

    #257041
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Install and activate your child theme, within the functions.php file add this:

    function sf_remove_scripts() {
    	wp_deregister_script('sf-maps' );
    }
    add_action( 'wp_enqueue_scripts', 'sf_remove_scripts', 100 );

    Thanks.

    #257065
    Jose
    Member
    Post count: 13

    Thanks David! It works. Instead of a child theme, I’m using this plugin to add code to functions.php:

    Code Snippets

    Great support!

    #257098
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Great thanks to David 🙂 .
    Thanks
    Mohammad

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register