How To Exclude Pages From WordPress Navigation Bar
Have you ever wanted to create a page on your WordPress site that doesn’t display on the navigation bar or even in the sidebar or footer areas? Yet you still want the pages you create to be easily accessible and search engine friendly so you don’t want to password protect them or make them private. Well, you can do all of this by excluding pages and I’m going to show you EXACTLY how to to do it.
I have about 8 pages on this very site but only 5 of the are visible on the navigation bar. None of the pages you don’t see have any type of privacy settings. The remaining ones are used either as thank you pages for when somebody subscribes to my blog or they are pages built for other marketing purposes.
Pages are displayed using this code. (primarily used in the header, footer and sidebar)
<?php wp_list_pages();?>
This little piece of code will list all of your pages until you add conditions between ‘()’. What you need to do is find out the unique ID of each page and then add the exclude condition. But in order to do that we must find out you page IDs. Here’s how you do that.
Go to Pages > Edit in your WP Admin and select the name of the page you want to exclude. Edit that page and you will see the unique ID for that page listed above in the address bar. It will looking like this.
http://www.yoursite.com/wp-admin/page.php?action=edit&post=24
The number at the end, 24, is the unique ID of that page and is the number you will need to use in the exclude code. You can do this for every page you want to exclude as long as you put a comma between then in the code. Here’s what it might look like.
<?php wp_list_pages('exclude=17,24' ); ?>You can see that you have added 'exclude=17,24' to the original list pages code.
Now if you’re not a WordPress junkie or just straight up don’t care for PHP then you are probably thinking this stuff is WAY to complicated for me.
You might even want to know if you can ask “WHY isn’t there an easier way?”
Well the answer is YES THERE IS! (man, asking questions are great huh?!)
And here it is my friends. It’s called the ePanel and it will take care of EVERYTHING that would normally have to be coded into your WordPress blog/website before now. My good friends over at Elegant Themes have designed the whole system for you and its incredibly simple to use.
Want to exclude a page with the click of a button? Just click the green check mark and its done…

If you want THE best themes around with simple integration, easy navigation, and great support then you have to check out Elegant Themes.
If you enjoyed this post, you might also like my eBook Article CannonIf you haven't got it yet, you may want to download this private interview with Frank Kern. Thanks for visiting!
Related Posts
-
lindagrace
-
hackmanj
-
MatthewNeer
-
dave
-
MatthewNeer
-
mcinpat
-
MatthewNeer
-
scottphares
-
glennarcaro
-
Phil Jackson























