Categories

Featured templates

Magento 2.x. How to change Contact page Google map location

Charlotte Bennett July 19, 2016
Rating: 5.0/5. From 2 votes.
Please wait...

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.

Magento_2x_How_to_change_Contact_page_Google_map_location_1

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:

  1. Go to your server using the hosting control panel or the FTP connection, and navigate to app/design/frontend/TemplateMonster/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.

    Magento_2x_How_to_change_Contact_page_Google_map_location_2
  2. 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.

    Magento_2x_How_to_change_Contact_page_Google_map_location_3
  3. Open the Embed Map tab, select the desired map size and copy the iframe code next to it.

    Magento_2x_How_to_change_Contact_page_Google_map_location_4
  4. Replace the existing code with the one you’ve just copied and save the file.

    Note: you may need to clear the Magento cache.

  5. 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
Best Magento Themes
This entry was posted in Magento Tutorials and tagged location, magento2, map. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket