I created a new WordPress Template named "Footer page". When a new page is created in WordPress and the user selects the template "Footer page" the new page should not appear in the navigation bar.
I did some research and found something called "Exclude Pages from List" that says "Use the exclude parameter to hide certain Pages from the list to be generated by wp_list_pages." but have no idea where I should put it my template file? Or if this is the best way to exclude a template page from the navigation bar?
My code for footer-page.php is as follows:
<?php
/**
* Template Name: Footer page
*
* A custom page template that does not appear in the navigation bar.
*
* The "Template Name:" bit above allows this to be selectable
* from a dropdown menu on the edit page screen.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<div id="container" class="one-column">
<div id="content" role="main">
<?php
/* Run the loop to output the page.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.
*/
get_template_part( 'loop', 'page' );
?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_footer(); ?>