PSA | Conflict Between Avada and SGO | Google Maps

[ad_1]

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

Avada 7.10 (released March 28, 2023) introduced a fix to solve a Google Maps API console warning caused by a missing callback attribute.

If you’re an Avada user, have a Google Map embedded in your website, and have enabled Combine JavaScript Files in SGO, please add the following code snippet to your functions.php file to solve the consequent browser console error: “awbMapInit is not a function.”

add_filter( 'sgo_javascript_combine_excluded_inline_content', 'js_combine_exclude_google_maps_inline_script' );
function js_combine_exclude_google_maps_inline_script( $exclude_list ) {
	
	$exclude_list[] = 'function awbMapInit';

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