New Landing How can we help? Themeforest Theme Support Joyn Google maps Api multiple times due too Ultimate addons for visual composer?

Viewing 15 posts - 1 through 15 (of 15 total)
  • Posted in: Joyn
  • #286846
    qoorts
    Member
    Post count: 10

    I’m not using the swift page builder but Visual Composer with Ultimate Addons plugin. Now the Google Maps is not working as the Api has been included multiple times because the theme and the addons plugin both include the APi.

    Can I use functions.php from my child theme to deactivate the script generated by the theme? Or plugin? Doesn’t really matter which one as long as it’s working! ๐Ÿ˜‰

    Thanks!

    #286919
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    function sf_map_remove() {
        wp_dequeue_script('sf-maps');
        wp_deregister_script('sf-maps');
    }
    add_action('init','sf_map_remove', 100);
    

    Thanks
    Mohammad

    #286926
    qoorts
    Member
    Post count: 10
    This reply has been marked as private.
    #286927
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me login detail to check and resolve the issue.
    Thanks
    Mohammad

    #286930
    qoorts
    Member
    Post count: 10
    This reply has been marked as private.
    #286934
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have managed to resolve the issue so please check it now.
    Thanks
    Mohammad

    #286937
    qoorts
    Member
    Post count: 10
    This reply has been marked as private.
    #286939
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Just check after clear the cache of browser.
    Thanks
    Mohammad

    #286940
    qoorts
    Member
    Post count: 10

    It’s resolved, i think! The code used:

    function sf_map_remove() {
    wp_deregister_script(‘sf-maps’);
    wp_dequeue_script(‘sf-maps’);

    }
    add_action(‘init’,’sf_map_remove’);

    #286941
    qoorts
    Member
    Post count: 10

    Thanks mohammad! ๐Ÿ™‚

    #286958
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Glad ๐Ÿ™‚ to help you.
    Thanks
    Mohammad

    #287661
    qoorts
    Member
    Post count: 10

    It seems that is still not resolved. The map does not display constantly, and the error that the api has been included multiple times is still there. The script is not working?

    #287678
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    I change the code to this one.

    function sf_map_remove() {
       wp_deregister_script('google-maps');    
       wp_dequeue_script('google-maps');
    }
    
    add_action('wp_print_scripts','sf_map_remove');

    Seems to be working fine with no errors in the console. Clear the cache and test again.

    -Rui

    #287781
    qoorts
    Member
    Post count: 10

    Yes it works!! ๐Ÿ™‚ thanks Rui!

    have a great day!

    #287998
    David Martin – Support
    Moderator
    Post count: 20834

    Thanks Rui.

Viewing 15 posts - 1 through 15 (of 15 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