In the BlueBiz Theme and most themes for that matter, the main navigation is set up to list all the pages you create in WordPress. While that is great on many levels, there are times when you may not want to include a page in your main navigation system. There are a couple of ways to get around this. We will cover both…
If you are a plugin junkie
Simply download the Exclude Pages plugin by Simon Wheatley. This nifty little plugin “…adds a checkbox, “include this page in menus”, which is checked by default. If you uncheck it, the page will not appear in any listings of pages”
If you are new to plugins, that’s ok - to install of course, first download the package utilizing the link above. Then:
- Unzip the contents of the package
- Upload the package to the Wordpress plugins directory, the path is wp-content/plugins
- Log in to your administration panel
- Activate the plugin
and then as Simon so eloquently puts it: “Create or edit a page, and enjoy the frisson of excitement as you exclude it from the navigation.”
Or Maybe you wanna play with some code?
This option will require that you play with the code of Wordpress a bit. The first trick is determine which file is housing the main navigation. In the BlueBiz Theme it is in the header.php file. Some themes place the menu in the sidebar. Take your best guess, then open that file in a plain ascii text editor. DO NOT use word or anything like it!
- Now look for some code that looks like php wp_list_pages(’SomeStuffInHere’ ); In the BlueBiz Theme, the SomeStuffInHere is exactly php wp_list_pages(’title_li’ );
- Change that by adding an exclude argument to make it look like this php wp_list_pages(’exclude=210&title_li’ );
Now by now you may be asking yourself - how the heck do i know what number to put in there. Very good question! To find the number of the page you would like to exclude, log into your administration panel of Wordpress. Go to the Edit pages. Hover your mouse over the page you would like to edit, and look in the lower left corner of your screen, in the grey area. There will be a bunch of gobbldygoop there. What you are looking for is a post number. It looks like this action=edit&post=SomeNumber.
Now remember that number and fill in the appropriate number in the line of code. If you want to exclude several pages, simple add a comma in between the numbers. There you have it. Now those page numbers are excluded.
There are also several other arguments you can add to the wp_list_pages tag. All of them can be found at the Wordpress Codex. Check ‘em out and have some fun!