How to Add WordPress Pages Without Adding Them to Navigation Menu

Sometimes when creating a new page, we do not want the page appears on the page navigaton menu. WordPress itself does not provide that option when creating a new page. To apply it, we must change it manually in the header.php file located in the current active theme directory.

How to apply:

  • Create a new page and publish it
  • Edit the  header.php file located in the current active theme directory
  • Find the wp_list_pages function, add the argument exclude = id, where id is the id of the page that will be excluded. Use commas to separate each id if you want to exclude more than one pages, e.g. wp_list_pages ( ‘exclude = 20,21′).
  • To get the id of each page, go to the Edit Page menu, place the cursor on the edit link and get the id of the page found on the page url (wp-admin/page.php?action=edit&post=20).
facebooktwittergoogle_plusredditpinterestlinkedinmailby feather


  1. says

    I found this informative and interesting blog, i think its very useful and knowledge able.
    I would like to thank you for the efforts you have made in writing this article.
    I am hoping the same best work from you in the future.
    My homepage: | | |

    Post by: jia you hottags251.

Leave a Reply

Your email address will not be published. Required fields are marked *