WordPress – How To Exclude Some Pages – list_pagesPosted on: July 5, 2017, by : admin
If you want to exclude some pages from displaying, use the function ‘wp_list_pages”. The PHP files to call this function can vary depending on your template, but usually they are invoked either in ‘header.php’ or ’sidebar.php’ (’rsidebar.php or ‘lsidebar.php’).
Just specify what pages to include or exclude as in the following examples:
How to find the page ID
Log in to your WordPress admin interface and go to Manage -> Pages. Click on the page that you want to include or exclude. In the URL bar of the browser, the last part is the page ID.