Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting

WPBakery Google Maps Not Working: Causes and How to Fix It

WPBakery Google Maps Not Working: Causes and How to Fix It

Short answer

The WPBakery Google Maps element usually fails because a normal Maps link was pasted instead of the embed iframe, a cookie tool or security header blocks the frame, the map sits in a hidden tab, or a theme map element lacks a valid Google API key.

Key takeaways

  • Copy the iframe from Share, then Embed a map.
  • Normal Maps links refuse to load inside frames.
  • Cookie tools often block maps until consent.
  • Security headers must allow Google frame sources.
  • Theme API maps need a key with billing enabled.
  • Exclude map iframes from lazy loading if they vanish.

Why is the WPBakery Google Maps element not working?

The WPBakery Google Maps element usually fails because the wrong code was pasted, a cookie tool or security header blocks the frame, the map sits in a hidden tab, or an API key is missing.

WPBakery Page Builder includes a Google Maps element that displays a map from an embed code. When it breaks, the result is often a blank box, a grey area or an error message.

Typical symptoms include:

  • An empty space where the map should be.
  • A grey box with no map tiles.
  • A message saying the page cannot load Google Maps correctly.
  • A refused to connect or blocked frame message.
  • A map that works in the editor but not on the live page.

This guide goes through each cause. If WPBakery itself is not loading, start with our guide on WPBakery Page Builder not working.

What are the common causes at a glance?

Matching the symptom to a cause first saves time, since a blank box and an API error need very different fixes.

SymptomLikely causeFirst fix
Blank or empty spaceWrong code pasted or no heightPaste the full embed iframe
Refused to connectNormal Maps URL used instead of embed URLUse Share, then Embed a map
Works only after consentCookie tool blocking iframesAllow or configure the map category
Grey box in tab or accordionMap loaded while hiddenMove map out or refresh on open
Cannot load Google Maps correctlyTheme map element missing API key or billingAdd a valid key or use embed
Missing on HTTPS pagesMixed content or blocked frameUse HTTPS embed, check headers

Find the row that matches what you see, then follow the matching section.

Did you paste the correct embed code?

Most broken maps come from pasting a normal Google Maps link instead of the embed iframe, so copy the code from the Embed a map option in Google Maps and paste it into the element.

WPBakery's own tutorial on how to insert Google Maps shows the expected process.

To get the right code:

  1. Open Google Maps and find your location.
  2. Click Share.
  3. Choose the Embed a map tab.
  4. Copy the HTML code, which starts with an iframe tag.
  5. Paste it into the Google Maps element's map embed field.

Google's help page on embedding a map covers the same steps from the Google side.

Short share links, such as the ones that open the Maps app, will not display inside a frame. Google blocks its normal pages from being framed, which causes the refused to connect message.

Is the map height set?

If the code is correct but nothing shows, the map may have no height, so set a height in the element or in the iframe code so the frame has space to render.

The iframe Google provides includes width and height values. Some themes override these with CSS, which can collapse the frame to zero height.

Check these points:

  • Set a height in the Google Maps element settings if available.
  • Keep the height attribute in the iframe code.
  • Inspect the element in browser developer tools to see its real size.

If the inspector shows a height of 0, a CSS rule is collapsing it. Add a height through the element's design options or custom CSS.

Yes, many cookie and privacy plugins block Google Maps iframes until the visitor accepts a marketing or third-party category, which leaves an empty box for anyone who has not consented.

This is often the intended behaviour under privacy rules. The fix is to make it clear, not to remove it.

Options include:

  • Configure the consent tool to show a placeholder with an accept button where the map would be.
  • Check which consent category Google Maps belongs to and whether visitors can easily accept it.
  • Test in a private window, accepting and rejecting consent to see both states.

Our guide on adding a cookie consent banner to WordPress covers how these tools manage third-party content. This is general information, not legal advice, so check your own obligations.

Is a security header blocking the frame?

A Content Security Policy that does not allow Google's frame sources will block the embedded map, so add the Google Maps domain to the allowed frame sources if you use such a policy.

Security plugins, hosts and CDNs can add a Content Security Policy header. If its frame-src rule does not include Google, the browser refuses to load the map.

Check the browser console. A blocked frame shows a clear policy error.

MDN's page on the frame-src directive explains the rule. Add the Google domain used in your embed code, then clear caches and test again.

Mixed content can also block maps. If your site uses HTTPS, make sure the embed code uses HTTPS too. Our guide on fixing mixed content warnings covers this.

Is the map inside a hidden tab or accordion?

Maps placed inside tabs, accordions or popups sometimes load while hidden and then show grey or misaligned when opened, so move the map to a visible area or make sure it reloads when the panel opens.

Embedded iframes usually handle this better than script-based maps. But some theme map elements calculate their size on page load, which fails when the container is hidden.

Try these fixes:

  • Place the map outside the tab or accordion.
  • Put the map in the first, default-open tab.
  • Use the simple embed iframe rather than a script-based theme map element.

If the accordion itself misbehaves, our guide on WPBakery accordion not working covers that problem.

Are you using a theme map element that needs an API key?

Many themes add their own advanced map elements that use the Google Maps JavaScript API, and these need a valid API key with billing enabled, unlike the simple embed iframe.

If you see the message that the page cannot load Google Maps correctly, the API key is missing, restricted or not linked to a billing account.

To fix it:

  • Create or check your key in the Google Cloud console.
  • Enable the Maps JavaScript API for that key.
  • Add your domain to the key's website restrictions.
  • Paste the key into the theme's settings.

Google's Maps JavaScript API error messages page explains each error. Check Google's current pricing before enabling billing.

If you only need a simple location map, the standard embed is free and avoids API keys. Our guide on embedding Google Maps in WordPress compares the options.

Could caching or lazy loading be hiding the map?

Yes, lazy loading scripts and optimisation plugins can delay or rewrite iframes, so exclude the map iframe from lazy loading and script delay features, then purge caches.

Some optimisation tools replace iframes with placeholders until the visitor scrolls. If their script fails, the map never appears.

Steps to try:

  • Exclude Google Maps iframes from lazy loading.
  • Turn off script delay to test.
  • Purge plugin, server and CDN caches.

Our guide on clearing cache in WordPress shows how to purge each layer.

Could a plugin or theme conflict be the cause?

Yes, conflicts can break the element, so test with a default theme and only WPBakery active on a staging copy of your site.

Follow the usual process:

  1. Create a staging copy.
  2. Switch to a default theme.
  3. Deactivate other plugins.
  4. Check whether the map appears.
  5. Reactivate items one by one.

Our plugin conflict guide has the full method. Also update WPBakery, since older versions may not handle current embed codes as well.

Once the map shows, test it on desktop and mobile, with and without cookie consent, so every visitor sees a working map or a clear placeholder.

Frequently asked questions

Why does my WPBakery Google Map show a blank space?

The most common reason is that a normal Google Maps link was pasted instead of the embed iframe. Copy the code from the Share menu under Embed a map and paste it into the element. Also check that the map has a height.

Do I need a Google API key for the WPBakery map?

Not for the simple embed iframe. An API key is needed for theme map elements that use the Google Maps JavaScript API. Those keys must have the right API enabled, domain restrictions set and billing linked.

Why does the map say refused to connect?

Google blocks its normal Maps pages from loading inside frames. Use the embed code from the Share menu instead, which is designed to be framed, and make sure your security headers allow it.

Why does my map only appear after accepting cookies?

Your consent tool is blocking Google Maps until visitors agree to third-party content. That is usually intended. Configure a clear placeholder with an accept button so visitors understand why the map is hidden.

Why is my Google Map grey inside a WPBakery tab?

Some maps calculate their size when the page loads. If the tab is closed at that moment, the map renders grey or misaligned. Move the map to a visible area or use the simple embed iframe.

Sources

  1. How to insert Google Maps WPBakery Knowledge Base
  2. Embed a map or directions Google Maps Help
  3. Error messages Google Maps Platform
  4. CSP: frame-src MDN Web Docs

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.