How to Create Parent And Child Pages in WordPress

How to create parent and child pages in WordPress

WordPress lets you organize pages in a hierarchy: a parent page can have one or more child pages (also called sub-pages) that belong to it. It is one of the simplest ways to keep a website tidy, and it takes less than a minute to set up.

In this guide you will learn what parent and child pages are, how to create them, how to change the parent of an existing page, and how to show the structure in your menu.

What Are Parent and Child Pages in WordPress?

A parent page is a normal page that groups related content. A child page is a normal page that you assign to a parent. Nothing else changes: both are created and edited in exactly the same way.

For example, a hairdresser could have a parent page called Services with one child page for each service:

  • Services (parent)
    — Haircuts (child)
    — Coloring (child)
    — Treatments (child)
  • About (independent page, no children)

Posts are organized with categories and tags, but pages have no categories. If your site is mostly made of pages, such as a business site, a portfolio or a course, parent and child pages are how you give it a clear structure.

Why use child pages?

  • Clearer navigation. Visitors can see how your content is grouped and find what they need faster.
  • Readable URLs. A child page URL includes its parent, for example yoursite.com/services/haircuts/, which tells visitors and search engines what the page is about.
  • Easier management. In the Pages list, children appear indented under their parent, so you can review a whole section at a glance.

How to Create a Parent Page

A parent page does not need any special setting. You create it like any other page.

  1. In your WordPress dashboard, go to Pages → Add New Page.
  2. Give it a title that describes the whole section, for example Services.
  3. Add the content you want, such as a short introduction and links to the child pages, and click Publish.
Adding a new parent page from Pages → Add New in WordPress

How to Create a Child Page

  1. Go to Pages → Add New Page and write the title and content.
  2. Open the settings sidebar (the gear icon in the top right corner of the editor).
  3. In the Page Attributes panel (in some versions the field appears in the Summary panel), find Parent and select the page this one should belong to.
  4. Click Publish.

The screenshots in this guide come from an earlier version of WordPress, but the option is in the same place: a Parent selector in the page settings.

Selecting the Parent page in the settings of a new WordPress page

Once the child page is published, you can see the structure in Pages → All Pages: the child appears under its parent with a dash in front of the title.

Child page listed under its parent in the WordPress Pages list

How to change the parent of an existing page

You do not need to create the page again. Either open the page and change the Parent field in its settings, or go to Pages → All Pages, hover over the page, click Quick Edit and pick a new parent from the dropdown. To make a page independent again, choose No parent.

Keep in mind that changing the parent also changes the page URL, so if the page is already indexed or linked from other sites, add a redirect from the old address.

How to reorder child pages

In the same Page Attributes panel there is an Order field. Pages with a lower number appear first in page lists that follow that order, for example 0, 1, 2.

How to Show Parent and Child Pages in Your Menu

Creating the hierarchy does not automatically add the pages to your menu, but it makes it easy to do so.

  • Classic menus: go to Appearance → Menus, add the pages and drag each child page slightly to the right, under its parent. It then shows as a dropdown or submenu, depending on your theme.
  • Block themes: open the Site Editor, edit your navigation and add the pages as submenu items, or use the Page List block, which displays pages with their hierarchy automatically.
Child page nested under its parent in the WordPress menu

If you also want to add posts to the menu, read How to Add Posts to WordPress Navigation Menu.

Tips for Organizing Pages with a Hierarchy

  • Keep it shallow. Two levels are enough for most sites. Very deep structures make URLs long and navigation confusing.
  • Use short slugs. Since the parent slug is part of the URL, short and descriptive slugs work best.
  • Link between related pages. Link the parent page to each of its children and each child back to the parent.
  • Add breadcrumbs. Breadcrumbs show visitors where they are in the hierarchy. If you use Yoast SEO you can enable them in its settings; see How To Install And Set Up Yoast SEO.
  • Use categories for posts. Parent and child pages are for static content. For blog posts, use categories and tags, and see How To Hide Categories From The Homepage In WordPress if you need to control what the homepage shows.

If you have not created your website yet, start with Create Your Website With WordPress, and after installing it follow the checklist in Important Things To Do After Installing WordPress.

Once your structure is ready, give your site a polished look with one of our WordPress themes for creatives.

References:
www.acmethemes.com
wpbeginner.com

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Shares
Share This