Creating a template page in LPagery is essential for generating dynamic and unique pages. This guide will walk you through the steps to create a template page that can be customized with dynamic placeholders, images, maps, and more.
Step 1: Create a New Template Page in WordPress
Create a New Page:
Design Your Page Layout:
Customize the layout of your page using your preferred editor or page builder. Add any headings, text, and content elements that will remain static across all generated pages.
Step 2: Add Dynamic Placeholders
To make your template page dynamic, you will need to insert placeholders that LPagery will replace with data from your source file.
Determine Your Placeholders:
Your placeholders should match the columns in your source file (e.g.,
{service}
,{city}
). These placeholders will be replaced with actual values when LPagery generates each page.
Insert Placeholders in the Content:
Add placeholders in the areas of your template where you want dynamic content to appear.
Example:
"The Best {service} Company in {city}"
When pages are generated, LPagery will replace these placeholders with the data from your source file, resulting in unique pages for each combination.
Example Generated Pages:
For Manhattan:
"The Best Window Cleaning Company in Manhattan"
For Brooklyn:
"The Best Floor Cleaning Company in Brooklyn"
Optional: Add Dynamic Elements
To further enhance your template page, LPagery allows you to add dynamic elements like images and widgets. These can also be controlled by placeholders from your source file.
1. Add Dynamic Images
You can replace placeholder images on each generated page based on your source file data.
Insert Different Images on Each Page: Dynamically insert images for each page (e.g., city-specific images).
Create Unique Meta Data for Images: Automatically create unique alt texts and metadata for images.
Learn more in the article Create Unique Meta Data for Images on Created Pages.
2. Add Widgets (e.g., Google Maps)
You can integrate widgets, such as Google Maps, into your template to display location-specific content.
Google Maps Widget: Dynamically insert maps for each page based on the location data in your source file.
Refer to the guide on Use Google Maps Widget with LPagery for more information.
3. Interlink Pages Dynamically
LPagery also allows you to dynamically interlink the generated pages using placeholders.
Interlink Pages: Insert dynamic links between pages based on their position (e.g., Next/Previous) or slug.
Learn how in the article Interlink Created Pages with Each Other.
Step 3: Publish the Template Page
Once you've added all placeholders and optional elements (images, widgets, etc.):
Publish the Page:
Click ‘Publish’ to save your template page. This page will be used as the basis for all generated pages.
Select the Template in LPagery:
Go to the LPagery dashboard and select the newly created template page as the base for generating pages.