PSA | Conflict Between The Events Calendar and SGO | Google Maps

[ad_1]

*** THIS IS A PUBLIC SERVICE ANNOUNCEMENT ***

The Events Calendar V6.0.13 (released May 8, 2023), introduced a fix to solve a Google Maps API console warning caused by a missing callback attribute.

If you’re an Events Calendar user, have a Google Map embedded in your events pages, and have enabled Defer Render-blocking JavaScript in SGO, please add the following code snippet to your functions.php file to solve the consequent (persistent) browser console warning: “Google Maps JavaScript API has been loaded directly without a callback.”

add_filter( 'sgo_js_async_exclude', 'js_async_exclude_google_maps' ); 
function js_async_exclude_google_maps( $exclude_list ){ 

$exclude_list[] = 'tribe-events-google-maps'; 

return $exclude_list; 
}

You’re welcome 🙂

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer