How to exclude pages from the header and sidebar / How to make hidden pages
This tutorial will help you hide a page. Let’s say you want to create a page on your blog, but you don’t want it showing up in the list of pages in the header or sidebar.
This is a LOT easier than the instructions below make it look. Really, it’s easy. I have just explained every detail so nobody gets left behind.
Oh – and I’m assuming you have already created and published the page you wish to hide.
So here goes:
1. Log in to your blog.
2. Hover over ‘Manage’ and click ‘Pages’
3. When the ‘Pages’ page has loaded, locate in the list the page you
wish to hide.
4. Hover your mouse over the link to the page and inspect it in the
bottom of your browser. It will show up as if you are going to click
on it, allowing you to see the exact URL.
5. In the URL you will see a number. I could be anything from 1 to who
knows what. It will be in numerical form. So your link may look like
this: /wp-admin/page.php?action=edit&post=11 So in this case, the number is 11.
looking at, not my example 11!
7. Now hover over ‘Design’ and click ‘Theme Editor’.
8. When the ‘Theme Editor’ page loads, scroll down and find ‘Header’
in th elist of pages on the right. Then click it.
9. The page will refresh and show you the contents of the header.php
file, allowing you to edit it.
10. Scroll down the file right to the bottom and locate the following
bit of code:
contain a number different to 5 as shown in the exampl above, but
that’s ok.
11. Now you are going to need the number you burned into your mind
earlier. In my example here it was 11. If you can’t remember your
number then you didn’t complete step 6 correctly…
12. You need to add a comma after the exclude=5 as shown in the
example and add in your number. So you would turn it into something
like this:
13. Now scroll down a little bit more and save the page (Update File).
14. Well done. You have just excluded the page from showing up in the
header of your blog! Woohoo! I knew you were smart
15. Smart you may be, but there is more work to be done.
16. You may also have a list of Pages in the sidebar of your blog. If
you do then keep going. If you don’t, you can celebrate now.
17. At the top of the page hover over ‘Design’ and click ‘Widgets’
18. On the right of the screen you will see a dropdown box allowing
you to choose whether you want to be working with the Middle Content
or the Sidebar. You need to select the one which contains the Pages
widget. 99% of the time this will be in the Sidebar.
19. Once you have found the Pages widget, click to edit it.
20. You will now be offered the option of excluding certain pages. You
will already see a number in there. That’s the number for the site map
page, because I didn’t want it to show up in the page list in the
sidebar (as well as not showing up in the header).
21. Just like before, type a comma after the number and then the numbe
you burned into your mind earlier. If you have forgotten the number
again then you really should join lumosity.com and exercise those
brain cells of yours.
22. Now save the widget, save the cheerleader, save the world.
23. Save your changes, and the page will refresh
24. Celebrate. For you have completed some really ADVANCED wordpress
wizardry! I told you you were smart
And that concludes todays lesson. Have fun!

Comment by Your Lovelife on 28 December 2008:
Lewis, items ten and twelve refer to some code which evaporated when you published this post (or else you forgot to paste it!).
Otherwise, thanks for the cool tip!