Do you want to show Google Maps on your WordPress website?
If you’re running a local business, then displaying Google Maps on your site can help users easily find your location. It can also help improve your site’s search engine visibility so you can attract more website visitors.
In this article, we will show you how to add Google Maps in WordPress.
Why Add Google Maps in WordPress?
Did you know that Google Maps is the most popular navigational app on all platforms?
If you have an office or physical store address, then adding Google Maps to your WordPress website makes it easy for users to quickly locate your physical stores, restaurants, or retail outlets. This helps you attract more customers and generate more business.
Not only that, but embedding Google Maps can also improve your WordPress SEO. According to Google, 46% of all searches are local. Adding Google Maps to WordPress can boost your local SEO and improve your visibility in local searches.
Now there are two ways to embed Google maps in WordPress, and we will show you both of them.
The benefit of the second method is that it follows all local SEO best practices, so if you use it, then Google will start to include your location on Google Maps. It will also display your business information like name, logo, address, phone number, open hours, and more in local search results.
Below are the quick links that you can use to go to the section you prefer:
- How to Add Google Maps in WordPress without Plugin
- How to Add Google Maps in WordPress with Local SEO (Recommended)
That being said, let’s see how you can add Google Maps to WordPress.
How to Add Google Maps in WordPress without Plugin
If you just want to quickly embed Google maps in a WordPress post or page, then you can use the default iFrame method.
Simply go to the Google Maps website and type in any street address in the search area.
Next, you need to click the Share icon and it will show a popup with the option to either Send a location link or Embed a map. You need to select the Embed a map option.
After that simply copy the HTML code for Google maps, and then open the page where you want to embed the map. Inside the block editor, you need to add a Custom HTML block.
Now you can simply paste the embed code you copied from Google maps, and then update or publish the page to preview the changes.
This method works for quickly embedding Google maps, but it doesn’t give you maximum SEO benefits.
If you’re a small business, restaurant, or online store with either a single or multiple physical location, then we recommend using the next solution to maximize your Local SEO rankings because it uses proper open graph data to help you rank higher in Google.
How to Add Google Maps to WordPress with Local SEO Plugin
The best way to add Google Maps and optimize your site for local SEO is by using All in One SEO (AIOSEO).
It’s the best SEO plugin for WordPress because it helps you get higher SEO rankings without editing code or hiring a developer. Over 3 million professionals use AIOSEO to improve their search engine rankings.
For this tutorial, we’ll be using the AIOSEO Pro version because it includes the Local SEO feature and other powerful optimization options. There is also a free version of AIOSEO that you can use to get started optimizing your site for search engines.
First, you’ll need to install and activate the AIOSEO plugin in WordPress. For more details, please see our tutorial on how to install a WordPress plugin.
Upon activation, the plugin will launch the setup wizard. You can click the ‘Let’s Get Started’ button to configure the plugin. If you need help, then please refer to our guide on how to properly set up All in One SEO in WordPress.
Next, you can head over to All in One SEO » Local SEO from your WordPress dashboard.
Then click the ‘Activate Local SEO’ button to get started configuring the local settings.
Once the Local SEO addon for WordPress is activated, you can add a single location or multiple locations in AIOSEO and display them on Google Maps. We’ll show you how to add both to your website.
Adding a Single Location
To add your locations, business information, open hours, and more, first you need to go to the ‘Location’ tab under All in One SEO » Local SEO.
If you have a single physical location, then keep the ‘Multiple Locations’ option set to No.
After that, scroll down to the ‘Maps’ section to pin your exact location.
Simply enter your address in the ‘Enter a query’ field and Google Maps will show your location.
Once you’ve entered your location, don’t forget to click the Save Changes button.
Adding Multiple Locations
If you have more than one physical location, then you’ll need to enable the ‘Multiple Locations’ setting under the ‘Location’ tab in Local SEO.
After that, a new Locations menu will appear in your WordPress admin panel.
Go ahead and navigate to Locations and then click the ‘Add New’ button.
Once you’re in the WordPress editor, scroll down to the ‘Map’ section.
Here you can enter your address in the ‘Enter a query’ field.
After entering your location on the map and adding location information, go ahead and click the ‘Publish’ button.
You can now repeat this step and add as many locations as you want for your business.
Once you’re finished adding your locations, you can go to the ‘Maps’ tab back in the All in One SEO » Local SEO menu.
Here you will have to enter a Google Maps API key.
Now, let’s see how to create an API key for Google Maps.
Creating a Google Maps API Key
To start, you’ll need to visit the Google Maps Platform website and click the ‘Get Started’ button.
After signing in with your Google account, you’ll need to set up a billing account.
Google Maps Platform has pay-as-you-go pricing, and they offer the first $300 of monthly usage for free for all users. For most websites, that will easily cover a simple map embed like the one we’re creating in this tutorial.
Don’t worry, they will not charge you any fees unless you manually upgrade to a paid account.
To get started, go ahead and click the ‘Create Billing Account’ button.
Next, you can select your country and choose what best describes your organization from the dropdown menu.
Once you’ve selected this information, click the checkbox for Terms of Service and then click the ‘Continue’ button.
On the next screen, you’ll need to enter your phone number for verification and click the ‘Send Code’ button.
After verifying the code, the next thing to do is enter your business name, payment method details, and billing address.
Once you’ve entered these details, click the ‘Start my Free Trial’ button.
Next, you’ll be asked a series of 4 questions about your organization and how you’ll use the Google Maps Platform.
Google Maps will ask about your primary goal for using the platform, which industry you’re in, select a use case, and your company size.
After answering these questions, go ahead and click the ‘Submit’ button.
You’ll now see a popup with your Google Maps API key.
You can copy and save this key in a text file for future use.
Now that you’ve created a Google Maps API key, you’ll need to head back to your WordPress dashboard to enter it in AIOSEO Local SEO settings.
Configuring Google Maps Settings in WordPress
You can now go back to All in One SEO » Local SEO from your WordPress dashboard and then navigate to the ‘Maps’ tab.
Go ahead and enter the Google Maps API Key in the ‘API Key’ field. You’ll see a preview of the map in AIOSEO as soon as you add the key.
Next, you can scroll down to edit the map settings.
AIOSEO lets you display Google Maps using a Gutenberg block, shortcode, widget, or PHP code. It also lets you choose different map styles and add a custom marker to your map.
Don’t forget to click the ‘Save Changes’ button when you’re done.
Displaying Google Maps in WordPress
Next, you can add Google Maps to any WordPress post or page. To start, simply edit or add a new page on your website.
Once you’re in the block editor, click the ‘+’ button at the top and add the ‘AIOSEO Local – Map’ block anywhere on the page.
After that, your Google Map will be added to the page.
AIOSEO also lets you edit the map settings from the options on your right. For instance, you can show labels and icons, add a custom marker, and edit the map’s width and height.
If you have multiple locations, then you can select which location to highlight by choosing from the options given in the menu on your right.
Simply click on the ‘Location’ dropdown menu and select your preferred location to display on your website.
Once you’re satisfied with your settings, go ahead and publish the page.
Now you can visit your website to see Google Maps in action.
You can also add Google Maps to your site’s widget section, like the sidebar or footer.
To start, head over to Appearance » Widgets from your WordPress admin panel. Next, click the ‘+’ button and add the ‘AIOSEO Local – Map’ widget block where you’d like to display your location.
After that, you can edit the widget settings.
For example, you could add a title, change the width and height of the map, choose which location to display if you have multiple locations, and edit the label.
Now when you update your website you’ll see Google Maps in your widgets area.
We hope this article helped you learn how to add Google Maps to your WordPress site. You can also check out our guide on the best WordPress plugins for small business, and our expert pick of the best identity theft protection service for entrepreneurs.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
melanie bund says
Hi, do you know how to hide the 13px white space at the bottom of the embedded google map?
Thank you in advance
WPBeginner Support says
For tweaking the CSS, it would depend on the specific embed but you can find the CSS needed to change using Inspect Element. We have a guide on Inspect Element you may find helpful here:
I have a google maps on my web, but the pin which is added to the map is not clickable. The pin only shows the adress but it do not direct if you click on it. Is it possible to do clickable icon?
WPBeginner Support says
For what you’re wanting, you would want to take a look at our article below:
Don’t you have to get an API from Google before you can use a map plugin and insert it into the plugin? That’s been my experience lately.
Hi I’m trying to insert a google map onto my website ( WordPress ) it keeps disappearing am I correct in thinking that google now want $200 a month for this or whatever the cost or can I still insert a map for free
WPBeginner Support says
Google now charges for large uses of their maps API which is what the plugin runs on, the $200 you likely saw was the free monthly credit Google gives to those using their API so smaller sites are not charged.
Yes, that true but there is alternative for Google maps API. OSMapper is the plugin that uses Open Street Maps API that does not requires any API keys and there is no limit for usage. You can install it from WordPress.org.
WPBeginner Support says
While we have not tested it yet, we will be sure to take a look at it.
I tried the first step: copy the HTML in the after going to the embed button and paste it into the text version of the post. I went to the visual one and saw the embedded google map. I saved it at the site takes out the map. The changed texts remain, though, but the map keeps vanishing. it keeps repeating each try. Why does it happen?
Miranda Olding says
Thanks – so clear x
Sara C says
Great tutorial – short and to the point. I had tried two other plugins that my client didn’t like. Thank you for the manual embedding information. Worked perfectly and quickly.
Many, many thanks for this tutorial.
Denny Png says
I would like to change the Google Map address & not sure where to locate this embedded link to update the WP backend. I couldn’t find it the contact menu to locate it.
Seek yr kind advise on it!
Thank you! This is what I was looking for! Perfect for my travel post on my blog! The video is great and very helpful!
Great Work Bro!!!!
Andy Kramer says
I would love to do this but when I go into google maps and type the address there is absolutely no gear so I can’t even get a link to copy for WordPress. Any ideas or suggestions?
I am having the exact problem. There is no flower on Google Maps anymore! So how does this work?
I can’t find the code.. There’s no “flower icon” nor other links on the bottom right of the map. Is it because the place I’m trying to add doesn’t have a street address, it’s just coordinates?
Thanks in advance.
Andy Meuleman says
A great lesson, easy to follow and implement.
Much thanks, Andy
Is there any way to get this Map as a background to a page with full length say width 100% n height 100% something like that??
Can you be more specific about what exactly do you need
Bigg Tobias Inspired says
So, I loved the map tutorial but what if I want to place it in a certain area of the page… Or side bar? Can anyone help?
Carla Spacher says
Thanks so much! Why would anyone bother with a plugin that may ultimately slow down their site when you have provided such easy instructions to grab the code from Google Maps?
By the way, if anyone is having trouble finding the code. Once you see the map, go to the bottom right-hand corner and click on the flower icon and click on “Share and embed map”. Then click on “Embed map” and enter into your WP page/or post.
Thank you. Very helpful post.
Hi, I was wondering if it is possible to have Google Maps to show the location of Groups (Buddypress)?
Thanks for your help.
i want to use plugin which provide exact location. can you suggest me? i use map press, leaflet market, wp google map etc. plugin but still no luck. all this plugin show some far location from my exact location. i want exact location where my shop is located. please help me. or is there any way to develop custom map & put in wordpress site? please provide step by step procedure.
Thanks & Regards,
Trang Tran says
Thanks for taking the time to write this article. It’s very helpful. Is it possible to add a Google Map that is linked with Google Places?
Very nice. But when we use coordinates, the lightbox map don´t work right. It just shows some place in USA. How can I fix this?
Powerful stuff man. Thanks
Nice straight forward instructions. I posted a nice trick on how to get rid of the info bubble on the other day (http://goodwebsites.co.nz/how-to-remove-info-bubble-for-embedded-google-maps). Might be helpful.
Christopher Rose says
Thanks for all the informative WP articles you’re posting.
Is it possible to add a Google Map to a site that
1. automatically adds the location of all site visitors or commenters to a map
2. allow all customers to be added, probably manually, although an automatic option would be good too. I have a small ecommerce site that has customers all over the world and thought it would be fun to show where we have sent stuff to.
That is so cool! … thanks
Thank you very much!
I have already founded (MapPress Easy Google Maps) and it is nice plugin.
And of course, your attention is very nice support. THANKS!!!
One more thing, please.
I would like to use these maps in tabs but only tab’s (shortcode) plugin I have found so far which shows maps is (Jshortcode). (I mean it shows in second or third tab. The others aren’t showing in second or third tabs.) It is nice plugin too but has very colorful tabs.
May be you would be so kind to advice some other plugins to solve this problem.