WordPress: Hiding Pages

Michael Mann
By default, some themes will list all pages, whether they are main pages or subpages. Depending on the number of pages in your WordPress blog, you might not want all pages to be listed. There are several ways to hide pages.

Hide Subpages

If you desire to hide all subpages (pages with a parent), this can be done at the theme level. Login to your WordPress administration panel and select Appearance >Editor from the navigation menu. On the Editor page, you will see a list of "theme files" to the right of the page. If you have multiple themes, first select the theme from the dropdown menu. Select Sidebar (sidebar.php).

Find the following line
wp_list_pages('title_li=

Replace it with the following line
wp_list_pages('depth=1&title_li=

This should work and should display only pages that are not children, in other words it should hide ALL the children pages.

Note: WordPress multiple user does not provide a means of doing this, by default, through the administration panel. This is done through FTP.

Exclude Pages

Another way of hiding pages is to selectively do so, allowing only those pages you wish to be included to be listed.

This is accomplished by using a plugin called Exclude Pages from Navigation. A checkbox is added to the page in the administration panel to allow for including the page in menus. This is checked by default, but unchecking this box will exclude the page.

Published by Michael Mann

With over 12 years of professional experience as a Web designer and over 25 years of general computer experience, I am often the resident tech . I own and operate Michael Mann Desktop Publishing, a desktop p...  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.