fervor [>]CODING & CURIOSITY
FERVOR LEARNING SYSTEMTUTORIALS
← WordPress

WordPress / 2 MIN READ

Nested Pages & Slugs

Managing nested pages and slugs in WordPress

From the original Fervor library. Examples may use older package versions.

Let’s create subcategory slugs with pages in WordPress. Pages are a bit different from posts because they are typically used for static content. However, you can create a nested page structure to achieve a similar effect. Here’s how to do it:

Step 1: Create Parent and Child Pages

  1. Login to your WordPress Dashboard: Open your site and add /wp-admin to the URL.

  2. Create a Parent Page:

    • Go to Pages > Add New.
    • Enter the title for your parent page (e.g., “Example”).
    • Publish the page.
  3. Create a Child Page:

    • Go to Pages > Add New.
    • Enter the title for your child page (e.g., “Slug of Site”).
    • In the Page Attributes box on the right, select the parent page you just created from the Parent dropdown (e.g., “Example”).
    • Publish the page.

Step 2: Verify the URL Structure

  1. View the Pages:

    • Go to Pages > All Pages.
    • Find the parent page (“Example”) and the child page (“Slug of Site”).
  2. Check the URL:

    • Open the child page (“Slug of Site”) on your site.
    • The URL should now be structured like www.yoursite.com/example/slug-of-site.
  1. Go to Permalinks Settings: Navigate to Settings > Permalinks.
  2. Select a Permalink Structure: Usually, the default structure works well for pages. But ensure that it supports nested pages. Typically, it’s /%postname%/.
  3. Save Changes: Don’t forget to hit the Save Changes button at the bottom.

Step 4: Add More Nested Pages (Optional)

  1. Create More Child Pages:

    • Go to Pages > Add New.
    • Enter the title for another child page.
    • In the Page Attributes box, select the appropriate parent page.
    • Publish the page.
  2. Check the Nested URL:

    • Open the newly created child page.
    • The URL should reflect the nested structure, like www.yoursite.com/example/another-slug.

Step 5: Troubleshoot Common Issues

  • Flush Permalinks: If the nested URLs aren’t showing up correctly, go back to Settings > Permalinks and hit Save Changes again to flush the rewrite rules.
  • Check Page Attributes: Make sure the parent page is correctly assigned in the Page Attributes box.

Bonus Tips

  • SEO and Readability: Keep your page titles and slugs descriptive yet concise for better SEO and user experience.
  • Organize Content: Use parent and child pages to logically organize your site’s content.

And there you have it! Now you can create beautiful, nested page structures in WordPress, giving your site a neat and organized look. Happy structuring! 🎉

Keep your curiosity going.Explore more WordPress →
287 TUTORIALS · 22 TOPICSREADY