Follow

Google Maps is Not Showing in the Admin or on My Site

This could be due from a number of reasons in regard to your specific theme. Please follow the steps in order to troubleshoot the problem:

1: Flush/Empty/Delete your Cache

Ensure that you have flushed your cache if you are using a caching plugin. Your hosting plan may also include forced-caching, which can cause trouble with many plugins, but can generally be solved by purging/flushing the cache. Typically this option is contained under the "Dashboard" tab or in the header bar in WordPress admin.

 

2: Check your theme’s footer.php file

Some custom theme’s forget to install a very important standard WordPress hook called “wp_footer();” which many plugins make use of.

Ensure that your theme’s footer.php file has this hook in it by completing the following steps:

  • Log into the admin section of your WordPress site
  • Locate the Appearance link in the left navigation panel and click on “Editor”
  • Locate the “footer.php” file in the list on the right side of the page and click on it
  • Ensure that “wp_footer();” is called just before the closing </body> tag. See the image below for an example:

wp_footer

  • Save the footer.php file and refresh your front-end page that contains the map’s short code. If your map is still not showing, please continue with this help file.

3: Check if jQuery is installed

If jQuery is not installed in your theme, you should be seeing the following message where your map should be displayed:

jquery-map-issue

If you are seeing a blank page where your map is supposed to be, please proceed with this help file.

4: Are you trying to display the map in Tabs or Accordions?

If you are trying to display the map in a tab or an accordion, you’ll need to modify the code to suit this (We have tried to put a universal check in for this but depending on your theme or plugin, this may not work as it should).

Please open wp-google-maps-pro/js/core.js and search for the following piece of code:

jQuery('body').on('tabsactivate', function(event, ui) {
for(var entry in wpgmaps_localize) {
InitMap(wpgmaps_localize[entry]['id'],'all',false);
}
});

Directly below that, add the following:

jQuery('body').on('click', '.the_class_name_of_your_tab_or_accordion', function(event, ui) {
for(var entry in wpgmaps_localize) {
InitMap(wpgmaps_localize[entry]['id'],'all',false);
}
});

Replace the .the_class_name_of_your_tab_or_accordion with the relevant class name of the element.
 

5: Identify if your website is producing any JavaScript errors

Use this WordPress tutorial to help identify JavaScript errors on your website’s front-end. See http://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors#Chrome

If there are in fact javaScript errors on your page, this could cause WP Google Maps to not function correctly. By reading the JavaScript error, you may be able to determine which plugin is causing the error. Your option thereafter could be to disable that particular plugin or make use of another similar plugin instead that doesn’t product any errors.

0 Comments

Please sign in to leave a comment.
Powered by Zendesk