Support » Plugin: Events Manager » [Plugin: Events Manager] Disable google maps API except on events pages?

  • Resolved Aaron Ware


    Couldn’t seem to find any documentation on it. Went to the main site to look at the available filters and the page was blank.

    Seems that the google api hangs every so often. This could be due to some other js libraries loading at the same time.

    Basically just want to disable the events google maps api from loading on our clients homepage.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hmmm @agelonwl not sure that’s what I am really looking for.

    More so looking to unenqueue the google maps on specific pages. I think I’ll probably end up just looking through the source and unregister the script if I’m not on an events page.

    Thanks though. I’ll post my snippet when I implement it either this afternoon or shortly there after.

    Plugin Author Marcus


    you can just remove #_MAP from your formats and the google libraries won’t be loaded.

    Hi Markus,

    Well for this situation. We still want the maps within the template of each event. But it’s trying to load the api on the home page and it hangs constantly. I say 4 out of 5 times. It’ll hang up on the loading.

    So I really just want to exclude it if is_home or is_front_page at minimum. I was going to just look though and see where the script was enqueued and either filter it myself or see about loading the googlemaps api asynchronously so it doesn’t affect the rest of the scripts.

    I have this in my list of items just haven’t had a chance to implement yet.

    Hopefully that makes sense. Not sure if any one else has noticed it loading the script slowly or not

    Plugin Author Marcus


    if you can’t do this with placeholders, maybe try using shortcodes/template tags on your home page and not use #_MAP in your formats.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Events Manager] Disable google maps API except on events pages?’ is closed to new replies.