shokideagroup

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Dequeue Events Calendar Google Maps API #1203807
    shokideagroup
    Participant

    Hey Cliff,

    Once you said something about priority it got me thinking that what I wanted to dequeue was in the footer. So I was able get it to work by replacing “wp_print_scripts” with “wp_footer”. I also only needed to dequeue two scripts, the following code is what worked for me in case anyone else needs to do the same thing.

    function tribe_events_map_apis() {
        wp_dequeue_script( 'tribe_events_google_maps_api' );
        wp_dequeue_script( 'tribe_events_embedded_map' );
    }
    add_action( 'wp_footer', 'tribe_events_map_apis' );

    I needed to dequeue your Google Maps API and use my own, because I needed to add “&callback=initMap” to the end of src.

    Thanks for your help!

Viewing 1 post (of 1 total)