Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.

Gallery

Contacts

411 University St, Seattle, USA

engitech@oceanthemes.net

+1 -800-456-478-23

WordPress
how to create a parent page in wordpress

WordPress pages are different from WordPress blog posts due to their static nature. If you want to change or update blog posts you can do it easily but the WordPress pages will stay evergreen with content secured in it. Some important WordPress pages are the About us page or the Contact us Page. 

To facilitate readers in comprehending your content on WordPress and increase traffic to your sites, WordPress provides the option to organize your materials. This not only hits the readers, but your site will also rank higher in search engines. The reason is, search engines love pages that are more organized and readable. 

What Is a Parent Page On WordPress?

The main page of WordPress which contains all sublinks of your posts as a drop-down is known as the Parent Page. This page creates a hierarchy of your blog posts or child pages. 

The parent page not only improves readability but also draws readers’ attention to other connected pages and content. When visitors search for certain material, they will quickly browse to your other child pages, increasing traffic to your fresh blog entries. Your material on a specific topic will also appear to be more extensive.

The main page keyword is also present in the URLs of child pages that are stacked within the parent page.

How To Create A Parent Page on WordPress?

You can create as many parent pages as you want. They will appear in your default menu with child pages embedded in them. You may also make any existing page a parent page and then add relevant links as child pages. To create a parent page follow these steps.

  • Open your WordPress Dashboard
  • Navigate to the Administration
  • Click Pages
  • Now Click Page Attributes. 
  • You can see “Add new screen” here. Click that and the “Page Parent” sub-menu will appear. 
  • The Page Parent will show the list of already created pages on your WordPress. Click the page you want to make Parent one. 
  • Click Publish. 
  • Now, double-check on the menu that your selected page has become the parent one. 

You may add multiple child pages on these parent pages which will appear in the drop-down menu. 

Related article: How to Clone a WordPress Site in Minutes

How To Create A Subpage In WordPress Parent Page?

Now you have a Parent page, you can relate your subpages to it in the following way.

  • Go to the Page Attributes of your particular Page which you want to edit as a subpage or child page. 
  • Click on the “No Parent Area” on the right side.

How-to-create-a-parent-page-on-your-WordPress-website-4

  • It will show all of the parent pages of your WordPress site. 
  • Click the particular page which you want to make parent of your current page. 
  • Click Publish. 
  • You can also create a new page and make it a child page of a particular page through Page Attributes.

Now again double-check your site to ensure all of the settings are restored. Your child pages will appear with a prefix in your Dashboard ‘Pages » All Pages’. Whenever users visit your site, these subpages will appear as drop-downs of your Parent Page. 

What If Page Attribute Is Not Showing On The Main Page?

Sometimes, beginners find it difficult to create parents or subpages due to the absence of the “Attributes” option. It is because this option is temporarily off your settings. To resolve this, 

  • Click on “screen options” on the right side of your screen. 
  • Click on the “Page Attribute” widget.

Your Page Attributes will now be visible on the Page settings option. 

How To List Your Sub-Pages On A Parent Page?

Whenever you want to add or delete a child page, you need to edit it manually. There are methods as well to list your child’s pages on the main Parent Page. For this, follow the following methods. 

1. Use A Plugin

After creating your Parent and Subpages, it is necessary to list your subpages on the main page. This will show your site’s efficiency as well. You can do this simply by using a plugin. For this, 

  • Install and activate the Page-list Plugin. 
  • Once activated, add the shortcode [subpages] on the Parent Page. 
  • Save the changes and double-check your setting on the new browser. 
  • The parent page will simply show all the subpages in bulleted forms. 

As WordPress site is all about customization, you can change the appearance of the list by using custom CSS as well. View the preview after applying the changes. You may use the following CSS to edit your settings. 

ul.page-list.subpages-page-list {
    list-style: none;
    list-style-type: none;
    background-color: #eee;
    border: 1px solid #CCC;
    padding: 20px;
}

Hence, using shortcodes you may edit depth, adjust the number of pages, add or remove items, etc.

2. Use A Code

If you are an advanced user or WordPress expert, then you can edit your child’s pages using different codes as well. Though this method is easy, it will not be convenient for beginners. If you are a beginner you can Choose Qwerty Experts WordPress Development services

For this, you also need to install a specific plugin and then enter a specific code. You may enter the following code. 

function wpb_list_child_pages() {
global $post;
if ( is_page() && $post->post_parent )
    $childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' );
else
    $childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' );
if ( $childpages ) {
    $string = '<ul class="wpb_page_list">' . $childpages . '</ul>';
}
return $string;
}
add_shortcode('wpb_childpages', 'wpb_list_child_pages');

There is also a shortcode as well so you don’t need to change the templates of your parent page. 

3. Edit Template File

If you are finding code methods difficult then stay relaxed. We have also brought another simple method that lets you list your child’s pages on the Parent Page easily. For this, you need to edit your template theme simply using page.php or create your own custom template. 

This custom theme is editable so your changes will be at the risk of disappearance. To avoid this, simply create your own child page themes and make changes to them. 

You can place the subpage wherever you like using the following code in your template. 

<?php wpb_list_child_pages(); ?>

Conclusion

It is useful to you and your readers to create a hierarchy by designating your site pages as Parent or Child pages. No matter how many pages you add, your content will remain in order. Not only that, but your WordPress will become more SEO-friendly and easier to rank.

Hence you can enlist your sites as Parents or subpages using our guide if you have not done it yet. 

Also check this article: How to Duplicate Pages in WordPress?