Thu. Jul 4th, 2024

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

1 min read

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.
July 2024
M T W T F S S
« Jun    
1234567
891011121314
15161718192021
22232425262728
293031