Skip to main content
All CollectionsAdvanced Guides
Create hierarchical pages
Create hierarchical pages

If you want to create structures like this: example/service/city here is how to add page structures.

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

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.

  1. Add the lpagery_parent Column: In your source file (CSV or XLSX), add a column named lpagery_parent.

  2. 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:

  1. Go to Create Pages: Navigate to the Create Pages section in LPagery.

  2. Select Parent Page: In the page creation settings, find the Parent Page option and choose the parent page you want for the generated pages.

  3. 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:

  1. Set parent2 as a Child of parent1: First, ensure that parent2 has parent1 as its parent.

  2. Assign parent2 as the Parent Page for Created Pages: In your source file, set parent2 as the value in the lpagery_parent column for each row, or select parent2 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.

Did this answer your question?