- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Magento 2.x. How to change Contact page Google map location
July 19, 2016
In this tutorial we will show you how to change the Google map location on a Contacts page in our new Magento 2 templates. Feel free to review some more Magento templates with Google Map feature.
The Google map here is added with the iframe directly to the form.phtml file on the server.
To change the location of the map, follow these steps:
Go to your server using the hosting control panel or the FTP connection, and navigate to app/design/frontend/Templateog体育首页/themeXXX/Magento_Contact/templates folder. Locate the form.phtml file and open it with some code editor. You will see the iframe code in the beginning of the file.
Navigate to the official Google Maps site, and type your address in the search field on top left. Then select the SHARE option from the menu below.
Open the Embed Map tab, select the desired map size and copy the iframe code next to it.
Replace the existing code with the one you’ve just copied and save the file.
Note: you may need to clear the Magento cache.
Check the your location on the site frontend.
We hope the tutorial was useful for you. Feel free to check the detailed video tutorial below:
Magento 2.x. How to change Contact page Google map location