• Resolved eduardoceruelo

    (@eduardoceruelo)


    Hi,

    My website it`s not showing de maps that what created with the wp maps pluging. In developed tools of the browser can see the next error:
    “You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors”

    I was investigating about the issue and my theme use the google maps too, so i think the error is that.

    Any option or advice to solve it?

    Please, could you help me?
    Thanks in the advance.

    Best Regards.

    Eduardo.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ashok Singh

    (@flippercode0505)

    Hello,

    Thank you for reaching out to us for support. We appreciate your trust in our services and are committed to assisting you promptly. Rest assured, we’ll do our best to resolve your issue and provide you with the assistance you need.

    You have to stop the theme api to load on that page. Please use this hook and add your map page id and the theme script handle. Please add this hook to your theme function.php file at last.

    function project_dequeue_unnecessary_scripts() {
        // Get the current page ID
        $page_id = get_queried_object_id();
    
    
        // Check if it's the specific page where you want to dequeue the script
        if ( $page_id === YOUR_PAGE_ID_HERE NUMERIC ) {
        	// Deregister the 'theme-script-handle-js' script to prevent it from being outputted
            wp_dequeue_script( 'theme-script-handle-js' );
            wp_deregister_script( 'theme-script-handle-js' );
        }
    }
    add_action( 'wp_print_scripts', 'project_dequeue_unnecessary_scripts' );
    Thread Starter eduardoceruelo

    (@eduardoceruelo)

    Hi,

    Thank you so much for your quickl answer.
    I know i have two maps, it worked fine for a long time, one map (the theme google map integrated) on the home page, then i was working on some additional maps for some pages, with the plugin, about 6 maps in different pages:

    1- Is it possible to work with both integration maps ( theme and plugin)?
    2- how can i set the $page_id === YOUR_PAGE_ID_HERE NUMERIC ? I dont know what to set there in this case.

    Thanks a lot!

    BR,

    Eduardo

    Hello Eduardo,

    Please contact us at support@flippercode.com so we can help you to resolve this issue with help of our technical team.

    Best Regards

    Hello,

    We hope that your issue has been resolved. If you still have any question, please create a new thread.

    Best Regards

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