Skip to main content
All CollectionsElementor Tutorials
Use Google Maps widget with LPagery
Use Google Maps widget with LPagery

You can create dynamic maps using placeholders in the Elementor Google Maps widget.

Jonas Lindemann avatar
Written by Jonas Lindemann
Updated over 2 months ago

This tutorial will guide you through dynamically setting different locations in the Elementor Google Maps widget for each page generated by LPagery. This is especially useful if you are creating location-specific pages and want the Google Maps widget to display a unique location on every page.


Step 1: Insert the Google Maps Widget with a Placeholder

  1. Create a Template Page:

    • Start by creating a new template page in WordPress.

    • Insert the Google Maps widget from Elementor into the page.


  2. Set the Location Placeholder:

    • In the Google Maps widget's location input field, enter a placeholder such as {location}. This placeholder will be dynamically replaced with specific locations from your source file.

    Note: At this stage, the map may jump to a random point — this is expected and can be ignored. The placeholder will dynamically adjust the location when the page is generated.


  3. Save the Template Page:

    • Once the placeholder is added, save the template page. You are now ready to proceed with setting up the dynamic locations.


Step 2: Add Locations to Your Source File

  1. Prepare Your Source File:

    • Open your source file (Google Sheet, CSV, or Excel). In this example, a Google Sheet is being used.

  2. Add Location Data:

    • Create a column in your source file labeled "location".

    • Fill this column with the specific addresses or coordinates for each page you want to create.

Example:

location

123 Main St, New York

456 Elm St, Chicago

789 Oak St, Miami


Step 3: Generate Pages with LPagery

  1. Go to the LPagery Dashboard:

    • In WordPress, go to the LPagery dashboard.

  2. Select the Template Page:

    • Choose the template page that you previously created with the Google Maps widget.

  3. Insert the Source File:

    • Paste the link to your Google Sheet (or upload your source file).

  4. Create Pages:

    • Click on Next and proceed to create your pages. LPagery will dynamically use the location data from your source file and replace the {location} placeholder with the corresponding value for each page.


Step 4: Review the Generated Pages

  1. Open the Generated Pages:

    • Once the pages are created, open the newly generated pages in WordPress.

  2. Verify the Map Location:

    • You should now see that the Google Maps widget on each page shows the specific location pulled from your source file.

    Each page will display a unique map based on the location data entered in your source file.

The Result:


Potential Problems

Sometimes the map on the created pages looks like this

This usually means, that Google did not find the location from the value from your source file.

How to fix

Check the spelling of the value from the source file that filled out the location in your Google Maps and correct it.

Did this answer your question?