Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Google map with wp_deregister_script('jquery')

Open pakiam opened this issue 9 years ago • 2 comments

Hi, when I disable built-in jquery on frontend, Google map stop working. How can I fix that ?

pakiam avatar Sep 26 '17 08:09 pakiam

Hi, why have you disabled the built-in jquery in the first place?

steve-themefuse avatar Sep 27 '17 12:09 steve-themefuse

Google map is depending on jquery see here: Unyson\framework\extensions\shortcodes\shortcodes\map\static.php used in Unyson\framework\extensions\shortcodes\shortcodes\map\static\js\scripts.js you can do that but is not a easy way, first you need to overwrite shortcode map: http://manual.unyson.io/en/latest/extension/shortcodes/index.html#content you need to rewrite scripts.js in pure javasacript to initialize map. I do not know what you are building but I think you're doing something wrong if you deregister default wp jquery, I do not see any reasons to do this, if you use cdn use hooks to replace urls if you want latest version of jquery again use hooks to replace default path jquery with your jquery version.

ViorelEremia avatar Sep 28 '17 08:09 ViorelEremia