Skip to content
GPLWP Guides

How to add interactive Google Maps to a WordPress site

Directories & Listings Time About 20 minutes 6 steps Updated 30 Oct 2026

DIRECTORIES & LISTINGS
The short answer

To add one interactive location map, copy Google Maps’ Embed a map iframe and paste it into a WordPress Custom HTML block. For multiple markers, filters, clustering, routes or directory listings, use a Google Maps plugin and configure the required API key.

The route
  1. 01Choose the map type
  2. 02Copy Google’s embed code
  3. 03Add a Custom HTML block
  4. 04Check the map on mobile
  5. 05Set up an API key for advanced maps
  6. 06Use WP MAPS PRO for directories

What you need

  • A WordPress site with editor access
  • The address, place or route to display
  • A Google account if you need Google Maps Platform APIs
  • A backup before installing a new plugin

Choose the map type

Decide whether you need one location, a route, or a directory-style map with several markers. A single business address is usually fine with Google Maps’ built-in embedding. Multiple locations, marker filters, clustering, custom icons or searchable listings usually need a plugin or custom development.

Do not use a screenshot if visitors need to zoom, pan, get directions or open the location in Google Maps.

Copy Google’s embed code

On a computer, open Google Maps and search for the place or route. Select Share, choose Embed a map, select a size, then copy the HTML. Google provides this iframe for a location or directions view. The standard sharing route is the quickest manual method, but it gives you limited control over markers, styling and map data.

Add a Custom HTML block

Edit the WordPress page or post where the map should appear. Add a Custom HTML block, paste the iframe code, save the page and preview it. The block accepts HTML such as the <iframe> supplied by Google.

If WordPress removes the iframe when you save, your user role or site configuration may not allow unfiltered HTML. Ask an administrator to add it, or use a map plugin instead.

Check the map on mobile

Open the published page on a phone and desktop. Make sure the map is large enough to use, the address is correct, the zoom level is sensible and the directions link works. Google’s embed documentation says an embedded map must be at least 200 pixels wide and 200 pixels high.

If the map is too tall or too wide, edit the iframe dimensions or place it inside a responsive container provided by your theme or page builder.

Set up an API key for advanced maps

If you need custom markers, address search, live directions, multiple map controls or data loaded from your directory, use the relevant Google Maps Platform API through a plugin or custom code. Create a Google Cloud project, enable the APIs the feature requires, create an API key and restrict that key to the APIs and websites that use it.

This is where maps often fail on a Friday: billing is not enabled, the wrong API is enabled, the key is restricted to the wrong referrer, or the key is missing. A dark map or a “for development purposes only” message usually points to an API key or billing problem.

Use WP MAPS PRO for directories

The fast route for a location-rich WordPress site is WP MAPS PRO. Install and activate it, connect the plugin to your Google Maps API key, then use its map builder to create a map and add locations. Insert the finished map using the plugin’s available block, shortcode or page-builder option.

It fits directory and listing sites because it supports markers, directions, filters, routes, map layers, multiple maps and clustering. You still need to configure the Google API correctly; a plugin does not remove Google’s key, API or billing requirements.

The fast route

Let WP MAPS PRO do it

Google Maps integration with markers, directions, filters, routes, and clustering for location-rich WordPress sites.

Get WP MAPS PRO

Sources

  1. support.google.com /maps/answer/7101463?hl=en-GB&utm_source=openai
  2. wordpress.org /documentation/article/custom-html/?utm_source=openai
  3. developers.google.com /maps/documentation/embed/embedding-map?utm_source=openai
  4. developers.google.com /maps/documentation/embed/get-api-key?utm_source=openai
  5. developers.google.com /maps/third-party-platforms/wordpress?utm_source=openai
  6. developers.google.com /maps/documentation/javascript/troubleshooting?utm_source=op…

Questions

Can I add Google Maps to WordPress without a plugin?
Yes, you can add one location or route without a plugin by copying Google Maps’ <strong>Embed a map</strong> iframe into a WordPress Custom HTML block. This is suitable for a contact page or single venue. It is not a practical way to manage many locations, filters, marker categories or directory listings because each map must be edited manually and the embed offers limited customisation.
Do I need a Google Maps API key for a WordPress map?
Not always for the basic iframe copied from Google Maps’ Share menu, but advanced Google Maps features generally require an API key. Plugins and custom maps may also need specific APIs enabled and a billing-enabled Google Cloud project. Restrict the key to the required APIs and your site’s domains so a leaked or misused key is less exposed.
Why is my Google Map blank or showing a development warning?
A blank map or “for development purposes only” message usually means the API key is missing, restricted incorrectly, attached to the wrong project, or being used without the required API or billing setup. Check the browser console and Google Cloud project, confirm the API is enabled, and review website referrer restrictions. If you use a plugin, check that its saved key is the one from the active project.
How do I show several locations on one WordPress map?
Use a Google Maps plugin or custom Google Maps JavaScript implementation for several locations. A basic Google Maps iframe is better for one place or one route, while a directory map needs a way to store locations, assign markers, filter results and often cluster nearby markers. Make sure the map also has an accessible list of locations for visitors who cannot use the interactive map.