Sometimes, people need to create pages in their blog, but they do not want to have them on the menu bar. Let’s discuss on how to exclude pages from the menu in WordPress.
In most cases, the menu is located in your theme’s sidebar.php but it can be found in other files. Open the file and search for the following code:
Get rid of it and place this fresh code snippet there:
<?php wp_list_pages('exclude=12,14' ); ?>
Now you can change the number to the page ID and that page will not be displayed in the menu. You may refer to the WordPress codex for more details.
There is also a plugin called Exclude Pages, it can do the job for you if you’re feeling lazy.