If you are creating a corporate website, you have almost certainly been asked to create a page with an address, a location or a way to get to the company. In this article I explain how to put a map in WordPress to feed that page.
Content of this Article
- 1 Without Google Maps
- 2 Put a map in WordPress for FREE
- 3 Conclusion
Sin Google Maps
If you're an android mobile phone user, you're probably more than familiar with Google Maps and its directions to any destination.
Until now, many developers used the Google API to be able to embed static maps with a specific address on their WordPress sites, especially on corporate websites or local business pages.
However, since the summer of 2018, Google began charging for using some of its services, including the Maps API. That is to say, you will have to pay according to the consultations that are made to the API from the map that you have inserted.
It is true that you get a free initial credit (about $200) and that those first consultations would not have cost ... but what happens if it is a site with a lot of traffic and there are many queries to the map?
Well, you'd have to pay, or the map would stop working.
In fact, you've probably found some pages lately with a darkened Google map and a message saying that Google can't show the map.
(If you've created a website with a Google map before, I recommend that you check it to see if it still works).
Put a map in WordPress for FREE
Fortunately Google does not own the world (even if they try) and there are alternatives, such as OpenStreetMap. So you'll find it pretty easy to put a map in WordPress for FREE.
Installation of the pluginPlugin Add-on that is added to the WordPress installation to give it more functions. There is an official repository with thousands of plug-ins available for installation.
Look for this Jesús Olazagoitia plugin in the official WordPress repository.
This is a block for the new WordPress editor (also called GutenbergGutenberg Editor for blocks of entries/pages that was included in the WordPress core from version 5.0) that allows you to put a map on your site in a super simple way.
Inserting the map block
Once the plugin is installed and activated, simply go to the page you are creating and insert a block called "Map Leaflet".
Although the block, by default, is included in the category of "Embedded" may, depending on the use, also appear in the most used or in the blocks of quick access, as you can see in the top left of the image above.
Customize block of maps
Once the map has been inserted, the next step would be to personalize it, both to show your address in the location and to choose the type of map, zoom, etc.
- In this field you must write the address you want to show on the map. If it is not exact, the block will show you a list with possible addresses for you to choose the one that corresponds.
- Here you can modify the text that will appear in the tooltip (text box that will be shown over the blue icon when you click with the mouse). You can include your company name to customize it even more.
- In this option you can modify the type of map that appears by default when embedding the block, from tourist map to black and white maps, hybrids, and so on.
- It is also possible to manually insert the latitude and longitude to position the icon on the map, and modify the zoom with which the location will appear.
- From here you can determine the height of the map block as well as activate or deactivate the zoom on the map from the scrooll wheel of the mouse.
As you can see, putting a map in WordPress for free is possible without the need to use Google services.
In addition, being a block for the new WordPress editor, it will be compatible with many other plugins and even with the main page buildersPage Builder Name by which the visual builders for WordPress are known. They are used to create entries or pages by dragging blocks or widgets where the content is included. that exist in the market.
And how do you do it? Are you one of those who prefer to risk and use the Google API to insert maps in WordPress? Or do you prefer not to be surprised and use this type of free plugins to display the maps?
Leave your comment below and share your experience with other users.
Implementador y Formador especializado en WordPress,
Coorganizador del grupo de Meetup WordPress Madrid.
Colaborador en el equipo de traducción de WordPress España.
Podcaster, YouTuber y fundador del blog WPnovatos.com