WordPress Pages — How to Create, Organize and Manage Page Hierarchies
In this tutorial, you'll learn to create and manage WordPress pages — building page hierarchies with parent and child pages, using page attributes for ordering, and organizing your site structure for better navigation and user experience.
What You'll Learn
- How to create a new page and understand the key differences from posts
- How to use page attributes: parent, template, and order
- How to build a page hierarchy (e.g., About Us > Our Team)
- How to set page order for menu ordering without custom menus
- How to manage pages using the All Pages screen, list view, sorted view, and bulk actions
- How to use Quick Edit for pages
- How page revisions work
- What page templates are and how to assign them
- When to use pages vs custom post types
Why It Matters
Pages define your website's permanent structure. Unlike blog posts that come and go in a feed, pages are the foundation — your homepage, About page, Services, Contact — every site needs them. Without proper hierarchy and organization, your WordPress site becomes a flat list of unrelated pages that confuses visitors and hurts navigation.
Real-World Use
A law firm needs a structured website: Home, About Us (with Our Attorneys and Firm History subpages), Practice Areas (with subpages for each practice), Resources (with Blog and Guides), and Contact. Each section has a parent page that organizes the content into a logical, browsable structure. Visitors find what they need without guessing.
Learning Path
flowchart LR
A[Writing Posts] --> B[Managing Pages]
B --> C[Page Templates]
B --> D[Media Library]
C --> E[Image Optimization]
D --> F[Comments & Discussion]
Creating a Page
To create a new page: Dashboard > Pages > Add New (or use the "+ New" link in the admin bar).
# Create a page via WP-CLI
wp post create --post_type=page --post_title="About Us" --post_status=publish
The editor is identical to the post editor — same Gutenberg blocks, same formatting tools. The key differences are in the sidebar settings:
- No Categories or Tags sections (pages don't use taxonomies)
- Page Attributes section replaces the Categories panel
- Featured Image is still available
- Excerpt is still available
Page vs Post — Recap for Pages
Pages are designed for content that:
- Doesn't change often (About Us, Contact, Privacy Policy)
- Needs to stay in one place (always accessible from the menu)
- Has hierarchy (parent/child relationships)
- Doesn't need categories or tags
- Doesn't need RSS feed inclusion
Posts are for content that:
- Changes frequently (blog articles, news)
- Needs categories and tags for organization
- Should appear in RSS feeds
- Should be archived by date
Page Attributes
The Page Attributes section in the Document sidebar (right side of the editor) contains three settings unique to pages:
Parent
Sets the parent page for creating hierarchy:
No parent → Top-level page (appears at the root)
About Us → Child page of About Us
About Us > Team → Grandchild page of About Us
To set a parent: Click the dropdown and choose an existing page. The slug updates automatically:
- Parent page slug:
about-us - Child page slug:
about-us/our-team
// Get the parent page ID
$parent_id = wp_get_post_parent_id(get_the_ID());
if ($parent_id) {
echo 'Child of: ' . get_the_title($parent_id);
}
Template
Specifies which PHP template file to use for this page. See the Page Templates lesson for details. By default, every page uses page.php.
Order
Controls the page's position when listed with wp_list_pages() or when displayed in menus that use the default order:
Order: 1 → Home
Order: 10 → About Us
Order: 20 → Services
Order: 30 → Contact
Pages with lower order numbers appear first. This is useful when you don't use a custom menu and rely on WordPress's automatic page listing.
// List pages in order
wp_list_pages(array(
'sort_column' => 'menu_order',
'title_li' => '',
));
Page Hierarchy
Building a page hierarchy is one of the most powerful features of pages. Here's a typical structure:
Home (parent, order: 1)
├── About Us (child of Home, order: 10)
│ ├── Our Team (child of About Us, order: 1)
│ ├── Our History (child of About Us, order: 2)
│ └── Careers (child of About Us, order: 3)
├── Services (child of Home, order: 20)
│ ├── Web Design (child of Services, order: 1)
│ ├── Development (child of Services, order: 2)
│ └── Consulting (child of Services, order: 3)
├── Blog (child of Home, order: 30)
├── Contact (child of Home, order: 40)
└── Privacy Policy (child of Home, order: 50)
Why Hierarchy Matters
- URL structure — Child pages have cleaner URLs:
/about-us/our-team/instead of/our-team/ - Navigation — Most themes automatically display sub-pages in dropdown menus
- Breadcrumbs — Hierarchical pages generate meaningful breadcrumbs: Home > About Us > Our Team
- User understanding — Visitors see the relationship between pages
Displaying Sub-Pages
// Display child pages of the current page
$children = wp_list_pages(array(
'title_li' => '',
'echo' => 0,
'child_of' => get_the_ID(),
'depth' => 1,
));
if ($children) {
echo '<ul class="sub-pages">' . $children . '</ul>';
}
Or, to list child pages in a sidebar:
if ($post->post_parent) {
// This is a child page — show siblings
$children = wp_list_pages(array(
'title_li' => '',
'echo' => 0,
'child_of' => $post->post_parent,
'depth' => 1,
'exclude' => $post->ID,
));
} else {
// This is a parent page — show its children
$children = wp_list_pages(array(
'title_li' => '',
'echo' => 0,
'child_of' => $post->post_ID,
));
}
Page Order for Menu Ordering
If you don't use a custom navigation menu (under Appearance > Menus), WordPress displays pages in alphabetical order by default. The Order field changes this.
Alphabetical order (default):
- About Us
- Blog
- Contact
- Home
- Privacy Policy
- Services
With order values:
- Home (order: 1)
- About Us (order: 10)
- Services (order: 20)
- Blog (order: 30)
- Contact (order: 40)
- Privacy Policy (order: 50)
// Using menu_order as the sort parameter
$pages = get_pages(array(
'sort_column' => 'menu_order',
'sort_order' => 'ASC',
));
foreach ($pages as $page) {
echo '<a href="' . get_permalink($page->ID) . '">' . $page->post_title . '</a><br>';
}
Note: If you use a custom menu (which most sites do), the Order field is ignored for menu display. Custom menus let you arrange items independently of page order.
Managing Pages (All Pages Screen)
The All Pages screen (Dashboard > Pages) is similar to All Posts but with page-specific features.
List View vs Sorted View
List view (default): Shows pages in the order set by the Order field, with hierarchy indented:
Home
About Us
Our Team
Our History
Services
Web Design
Development
Blog
Contact
Sorted view: Click the "Sort by" dropdown to sort by title, date, or author. Pages are listed flat (no hierarchy).
Bulk Actions on Pages
| Action | What It Does |
|---|---|
| Move to Trash | Soft-deletes pages |
| Edit | Opens bulk edit (change template, status, author, parent) |
| Restore | Restores from Trash |
Quick Edit for Pages
Hover over a page title and click "Quick Edit" to change without opening the full editor:
- Title and slug
- Published date
- Page template
- Page parent
- Page order
- Post status
- Password
- Comment/ping status
- Author
Page Revisions
Pages have the same revision system as posts. Every save creates a revision:
- Open a page in the editor
- In the Document sidebar, click "Revisions"
- Use the slider to compare versions
- Restore any previous version
// Get all revisions for a page
$revisions = wp_get_post_revisions($page_id);
foreach ($revisions as $revision) {
echo 'Revision by ' . get_the_author_meta('display_name', $revision->post_author) .
' on ' . $revision->post_date;
}
When Revisions Matter for Pages
Pages often contain critical content (About, Contact, legal pages). If someone accidentally deletes your privacy policy content, revisions save you.
Page Templates Explained
Each page can use a different template file from your theme. The Template dropdown in Page Attributes shows all available templates.
Common Built-in Templates
| Template | Purpose |
|---|---|
| Default Template (page.php) | Standard page with sidebar |
| Full Width Template | Page without sidebar |
| Blank Template | Minimal layout for landing pages |
| Custom templates | Any template registered by your theme |
Assigning a Template
- In the page editor, find Page Attributes in the sidebar
- Open the Template dropdown
- Choose a template
- Update or publish the page
// Check which template a page is using
$template = get_page_template_slug(get_the_ID());
if ($template) {
echo 'Using template: ' . $template;
} else {
echo 'Using default template (page.php)';
}
When to Use Pages vs Custom Post Types
Sometimes you need more structure than pages provide but less than a full CMS.
| Use Pages When | Use Custom Post Types When |
|---|---|
| Content is part of the site structure | Content has different fields than pages |
| You need hierarchy (parent/child) | You need categories/tags |
| 10-50 pages total | 100+ items |
| Simple content (text + images) | Complex data (events, products, portfolios) |
| No need for custom fields | Need custom fields (dates, prices, locations) |
Converting Pages to Custom Post Types
If your page content grows beyond what pages handle well:
// Copy page content to a custom post type
$page = get_post($page_id);
$new_post = array(
'post_title' => $page->post_title,
'post_content' => $page->post_content,
'post_type' => 'your_cpt',
'post_status' => 'publish',
);
$new_id = wp_insert_post($new_post);
// Copy custom fields
$meta = get_post_meta($page_id);
foreach ($meta as $key => $values) {
foreach ($values as $value) {
add_post_meta($new_id, $key, $value);
}
}
Common Mistakes
Creating pages that should be posts: Putting blog content on pages means it won't appear in RSS feeds, can't use categories, and won't archive properly. Use posts for time-based content.
Ignoring page order and parent settings: All pages at the same level with default order creates a flat, disorganized site. Always set parent and order.
Using too many top-level pages: 15+ top-level pages overwhelm navigation menus. Group related pages under parent pages (e.g., "Services" as parent with sub-pages for each service).
Not setting a template for landing pages: Landing pages need full-width, distraction-free layouts. If you use the default page template, you get sidebars and metadata that distract from the conversion goal.
Orphan pages with the wrong parent: Moving pages without checking their sub-pages creates orphans (child pages whose parent no longer exists). Use bulk edit to reassign children.
Practice Questions
- A client wants an "Our Team" page that is part of the "About Us" section. How do you set this up using page hierarchy?
- How is the page Order field different from using a custom menu?
- When would you use a custom post type instead of pages?
Challenge: Create a complete site structure for a consulting firm with 15 pages organized in a hierarchy. Use page attributes (parent, order, template) correctly. Verify the structure using wp_list_pages() and ensure breadcrumbs make sense at every level.
FAQ
Mini Project
Build a complete page hierarchy for a business website:
- Create a Home page (order: 1)
- Create an About Us page (child of Home, order: 10)
- Create Our Team and Company History as child pages of About Us (order: 1, 2)
- Create a Services page (child of Home, order: 20)
- Create 4 child pages under Services: Web Design, Development, Consulting, Support
- Create a Blog page (child of Home, order: 30)
- Create a Contact page (child of Home, order: 40)
- Create a Privacy Policy page (child of Home, order: 50)
- Assign the default template to most pages and the full-width template to Contact
- Verify the hierarchy in the All Pages list view
What's Next
Now that you can manage pages, learn Page Templates to create custom layouts for different pages. Then explore Media Library to manage images and files.
For more on content structure, see Posts vs Pages and Writing Posts.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro