Forums › Bug Reports › Divi Theme
- This topic has 2 replies, 2 voices, and was last updated 6 years, 1 month ago by
Eyal Fitoussi.
-
AuthorPosts
-
March 29, 2016 at 9:01 am #51399
Kyle Harris
MemberUp until recently ive used this plugin with no major issues with the divi theme but recently locations wont find or save on new posts (projects) an ive also noticed the divi map plays up,
i saw on the forums you suggested removing a line of code from the themes core file (never really a good idea as any theme updates will revert it back to the original) plus i use a childtheme for divi
The only things i use on my individual posts are [gmw_post_info info=”website”] and [gmw_post_info info=”formatted_address”] the rest including map i use divi modules as its all styled into my theme
any help getting this working again would be great as i have alot of content all using divi builder so changing theme isnt an option
Private Content HiddenMarch 29, 2016 at 1:41 pm #51401Eyal Fitoussi
MemberHi Kyle,
Few other users reported conflicts between DIVI and GEO my WP ( mainly the issues with GEO my WP Location section not saving the location ) and the only solution was to remove the line of code from the theme. This line of code includes Google Maps API which GEO my WP also does. However, multiple calls to Google Map API is the cause for the conflict between GEO my WP and the theme. There is no other solution I can recommend.
The ideal way to include a script is to first use wp_register_script to register the script ( but also make it possible to remotely deregister the script if needed ) and then use wp_enqueue_script whenever the script needs to be included. However, in the theme the developers use only wp_enqueue_script, without wp_register_script first, which makes it impossible to deregister the script. And so, there is no other way ( except for removing the line of code directly from the theme ) to remove the call that the theme makes to Google Maps API.
GEO my WP, for example, provides a filter that allows you to disable its call to Google API. You can do so by adding the below line of code to the functions.php file of your child theme:
1add_filter( 'gmw_google_maps_api', '__return_false' );However, by doing so GEO my WP will most likely not work properly or at least not all of its features. That’s because GEO my WP includes additional libraries ( Google map’s libraries ) that DIVI does not include.
You can try the line of code above and see if it works for you. Otherwise, you might want to contact the DIVI theme developers and ask them to add a filter or admin option that will disable the Google Maps API call.
I hope that helps.
April 5, 2016 at 3:34 pm #51523Eyal Fitoussi
MemberThis topic marked “Resolved” due to inactivity. If you wish to reply to this topic please change its status to “Not resolved” before replying.
-
AuthorPosts
You must be logged in to reply to this topic.