Knowledge base / WordPress

Fix “Google Maps JavaScript API multiple times” in WordPress

Two loaders on one page means the second load replaces the first and whichever map initialised first stops working.

How to tell this is your problem

  • Console warns the API was included more than once.
  • The map appears then goes blank.
  • Markers or info windows stop responding.

Why it happens

Each plugin enqueues its own copy of the loader. The API is not designed to be initialised twice in one document.

The fix, step by step

  1. 01Open the network tab and filter for maps/api/js — count the requests.
  2. 02Identify the plugin behind each request from the initiator column.
  3. 03Disable map loading in all but one plugin, or dequeue the duplicate script in your theme.
  4. 04If both plugins are needed, keep the one that renders the visible map.

Confirm it is fixed

After the fix the network tab shows exactly one loader request and the console warning is gone.

Check whether this is your error

A scan tells you in about twelve seconds, from a clean session.

Related articles