Have you ever wanted to change a child page’s URL in WordPress by removing the parent page slug?
WordPress automatically adds the parent page’s slug as a prefix to child page URLs for better organization and SEO. This structure helps visitors understand the page hierarchy. However, some users prefer simpler URLs without the parent page’s slug.
In this guide, we will show you how to easily remove the parent page slug from a child page URL in WordPress.
Understanding Parent Page Slug in WordPress
In WordPress, pages can be organized hierarchically, with child pages nested under parent pages. This creates URLs like:
http://example.com/parent-page/child-page/
This hierarchical structure is beneficial for SEO and content organization. It helps users navigate related pages.
Why Remove the Parent Page Slug?
While hierarchical URLs are recommended, some users may prefer cleaner URLs for aesthetic or specific navigational reasons. Removing the parent page slug might be desired in such cases.
How to Remove Parent Page Slug
To remove the parent page slug from a child page URL in WordPress, follow these steps:
- Install Custom Permalinks Plugin: Begin by installing and activating the Custom Permalinks plugin from the WordPress repository.
- Edit Child Page URL: Navigate to the child page you want to modify. Below the content editor, locate the ‘Custom Permalinks’ field.
- Customize URL: Click on the permalink field to edit it. Replace the current URL with your desired custom URL for the child page. For instance, if the original URL was ‘parent-page/child-page/’, you can change it to ‘child-page/’.
- Update and Save: After entering the custom URL, click the ‘Update’ button to save your changes. The plugin will automatically redirect old URLs to the new one, preventing 404 errors.
Conclusion
Changing URLs by removing parent page slugs in WordPress can be done easily with the Custom Permalinks plugin. While hierarchical URLs are generally recommended for SEO and organization, this method allows flexibility for users who prefer different URL structures.