When to Use This Feature
This functionality is beneficial when you need the same slug for pages under different parent pages. For instance, if you offer the same service in multiple locations, you can have URLs like /manhattan/window-cleaning and /brooklyn/window-cleaning. This approach is applicable to hierarchical post types, such as pages.
Steps:
Create Parent Pages: Begin by creating the parent pages that will serve as the parent pages. In this example, create pages for the cities "Brooklyn" and "Manhattan".
Create Service Pages: Next, create the service pages with a slug formatted as {service}. These pages will represent the services offered in each location.
Prepare the Input Sheet: Organize your data in a spreadsheet with columns for city, service, and lpagery_parent. The lpagery_parent column should contain the slug of the corresponding parent page.
Example Input Sheet:
city | service | lpagery_parent |
Brooklyn | Window Cleaning | brooklyn |
Manhattan | Floor Cleaning | manhattan |
Brooklyn | Floor Cleaning | brooklyn |
Manhattan | Window Cleaning | manhattan |
Now when you want to create pages using this source file, you will receive a warning indicating duplicate slugs. Click the "Enable parent as identifier" button to use the parent page as an identifier. This ensures that pages are distinguished by their parent in addition to the slug.
After clicking the button ,you will see that the issue is gone
Now you can create the pages and you will get pages with the following slugs:
brooklyn/window-cleaning/
manhattan/floor-cleaning/
brooklyn/floor-cleaning/
manhattan/window-cleaning/