How to hide or exclude a page from the WordPress main menu
The main menu is populated by your theme, probably by the header.php file, with the function
<?php wp_list_pages('arguments'); ?>
So, if you want to exclude a specific page from being on the main menu I would suggest these two solutions:
- The simply oneIf your theme shows just the root pages and you don’t mind about the real position of the page…
- Create an empty root page and set its state to draft, in this way it will not appear in the main menu.
- Create the desired page under the just-created one and publish it.The page will be available from the slug
- The true oneIf you need the page to be root, or if your theme shows page childrends…
- Open header.php from your theme directory
- Modify the wp_list_pages function adding an exclude parameter, like the following exampleBefore:
<?php wp_list_pages('title_li='); ?>
After:
<?php wp_list_pages('exclude=123,456&title_li='); ?>
Where 123 and 456 are the ids of the pages you want to exclude from the list



Thanks a lot for the tips. It helps me a lot for Hiding my page in Home page. Added this Tips in my collection.
Doesn’t work anymore on new version of wp.
but this patch worked for me, http://www.texto.de/texto/wp-25-wp_list_pages-exclude-bugfix/#comment-21715
Hi! I was surfing and found your blog post… nice! I love your blog.
Cheers! Sandra. R.
I love your site.
Love design!!! I just came across your blog and wanted to say that I?ve really enjoyed browsing your blog posts. Sign: ndsam
Yes ! Really helpful .. Thanks for the post
great post!
But i have a question : How to make a page at menu bar invisible but no hidden?
thanks!-sorry for my bad english!
mcreator: what’s the difference between invisible and hidden?!?
dear Sid , i mean how to make a page unclickable
e.g. make unclickable a parent page
This worked like a charm! Thanks so much for your post!
It worked, thanks, but you have to know what is the page id… see link below for a helpful hint:
http://www.techtrot.com/wordpress-page-id/
That was a very helpful article.
Just fixed an issue at my blog.
Thank you!
I’m new at this and I’m very confused. I would like some pages to be hidden from the main navigation menu but still be able to be linked to.
The thing I don’t know is where exactly do I put the code?
The theme I am modifying is the Brunelleschi theme, and there is no wp_list_pages in the header.php file.
Do I just need to add it in there somewhere?
Any help would be appreciated. Thanks.
I actually just found a nice and simple plugin(Exclude Pages from Navigation) that does it. So much easier.
Thanks anyways.
Thanks for this guide! Now i will not use plugin for excluding pages.