How to Exclude Selected Pages from the WordPress Navigation

Pages are displayed with the following code, which is generally used in the header, footer, or sidebar.
 

This will list all of your pages until you add conditions in between ‘()’. You need to use the exclude condition and find out what number ID each page has. The exclude code looks like

You can see that you have added 'exclude=17,38' to the original
list pages code.

Of course, we need to locate the correct ID numbers for your pages.

Go to Manage > Pages and select the name of the page in which you would like to exclude. In the address bar of your web browser will be a URL that looks like the following.
http://www.yoursite.com/wp-admin/page.php?action=edit&post=96
The number at the end, 96, is the ID number for the page and is the number you will use in the exclude code. You can do this for each page that you want to exclude as long as you put a comma between the page numbers in the code.

site visitor