Link to home
Start Free TrialLog in
Avatar of tekgrl
tekgrl

asked on

WP Page -- Don't want it to appear in nav

Hi all. I have a freestanding page on my WP site that needs to be editable, yet I don't want it to appear as a link in the nav. Do I make it a post instead of a page?I have a blog within my site and I don't want this page/post to appear there. It's just a freestanding one-of-a-kind page.
Avatar of Marcellino Santoso
Marcellino Santoso
Flag of Netherlands image

-. take a note of your page's ID

After you’ve logged into your WordPress dashboard, Go to Manage > Pages and from the list of Pages hover over the Page title you want to find the ID of. Every time you hover over, your browser’s status bar will show you a URL ending with a number like this.

http://www.xyz.com/wp-admin/page.php?action=edit&post=6

Open in new window

The number with which the URL ends is the Page ID (6 in this case).

-. edit your active theme
-. find the following function
<ul>
  <?php wp_list_pages(); ?>
</ul>

Open in new window

-. change it to :
<ul>
  <?php wp_list_pages('exclude=6' ); ?>
</ul>

Open in new window

-. save and upload the .php file that you have edited (if you editing it locally)
Avatar of tekgrl
tekgrl

ASKER

I couldn't find that code in my theme. I think this is the code that creates my nav (it's from header.php), but I'm not sure how to edit it.
<div id="access" role="navigation">
			  <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
				<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
				<?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
				<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
			</div><!-- #access -->

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Marcellino Santoso
Marcellino Santoso
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tekgrl

ASKER

That's it. Thanks!
Avatar of tekgrl

ASKER

Not sure why it's saying this. I want to award 500 points to meb_santoso
euh... your welcome?

but i think it's customary to give the points to somebody else's comment as solution and not  to your own comment ?

Quote: "Notice: tekgrl has requested that this question be closed by accepting tekgrl's comment #35143236 (0 points) as the solution for the following reason: Beautiful!"
nevermind my comment #35143252 :-)

glad I can help.