Google Maps

Google Maps

The Eminent Law Theme also offers a straightforward approach to integrating Google Maps into your website, providing visitors with easy access to your location. You can add Google Maps to your page using two different methods: Embedding an Iframe and Using the Google Maps API.

From the WordPress dashboard, go to ‘Pages‘ and select the page where you want to add the Google Maps section or click ‘Add New‘ to create a new page.

In the page editor, click the ‘+‘ icon to add a new block, search for the “Google Maps” block, and select it.

Method 1: Embedding an Iframe

  1. Select Your Location: Navigate to Google Maps and search for your desired location.
  2. Copy the Iframe Code: Once you’ve found your location, click on the ‘Share’ button, select the ‘Embed a map’ tab, and copy the provided Iframe code.
  3. Paste the Iframe in the Gutenberg Block: Go to the WordPress dashboard, navigate to ‘Pages’, and select the page where you want to embed the map. In the page editor, add a custom Gutenberg block, and paste the copied Iframe code into this block.
image
image

Method 2: Using the Google Maps API

  1. Obtain the Latitude and Longitude: Go to Google Maps and find your location. Right-click on the location and select “What’s here?” to obtain the latitude and longitude values.
  2. Enter Lat/Long Values in Theme Settings: In the WordPress dashboard, go to the page where you want to add the map. Look for the Latitude and Longitude values inside the theme’s custom fields or settings area. Enter the latitude and longitude values in the respective fields. Furthermore, you can also add a custom mark to locate your address and address information field.
  3. Insert Your API Key: Obtain a Google Maps API key by following Google’s instructions. Enter the API key in the designated field within the theme settings.
image
image

After entering the necessary details, click ‘Publish’ to make the map visible on your page.

The integrated map will be visible on the page as attached :

Did this answer your question?