If you want to build structured URLs like example.com/service/city
, LPagery allows you to create hierarchical page setups by assigning parent pages to generated pages. Here’s a quick guide on how to achieve this.
This feature is available for the LPagery Extended plan and above.
Click here to purchase LPagery Pro ->
Important Note on URL Structure
The URL structure of your pages will depend on your WordPress permalink settings. This guide assumes a basic permalink structure in which parent pages are automatically added to the slug, resulting in URLs like /parent/pagetitle
. You may want to check your WordPress settings if your structure differs.
Methods for Creating Hierarchical Pages
There are two main ways to set up hierarchical page structures in LPagery:
1. Using the Source File with lpagery_parent
Functional Column
You can define parent pages directly in your source file using the lpagery_parent
functional column. This method allows you to specify the parent page for each created page dynamically.
Add the
lpagery_parent
Column: In your source file (CSV or XLSX), add a column namedlpagery_parent
.Specify Parent Pages: For each row, enter the slug or ID of the desired parent page in the
lpagery_parent
column. This will assign the specified parent page to each generated page.
For more details on setting up functional columns in your source file, refer to our main article on Functional Columns in LPagery.
2. Using the Parent Setting in the LPagery Dashboard
If you want to assign a single parent page to all pages generated in a specific session, you can use the LPagery dashboard:
Go to Create Pages: Navigate to the Create Pages section in LPagery.
Select Parent Page: In the page creation settings, find the Parent Page option and choose the parent page you want for the generated pages.
Generate Pages: This setting will apply the same parent to all pages created in this session.
This method is straightforward for creating simple hierarchical structures with a consistent parent page across multiple pages.
Example: Creating Multi-Level Hierarchies
To achieve a multi-level structure like /parent1/parent2/created-page
:
Set
parent2
as a Child ofparent1
: First, ensure thatparent2
hasparent1
as its parent.Assign
parent2
as the Parent Page for Created Pages: In your source file, setparent2
as the value in thelpagery_parent
column for each row, or selectparent2
in the LPagery dashboard as the parent for all generated pages.
With this setup, each created page will follow a hierarchical structure, appearing under both parent1
and parent2
in the URL.