for instance, If I have pages "Home | About | Hot Rods | Street Bikes"
I would like to exclude "Hot Rods" from the header navigation when the visitor is on the page and child pages about 'street bikes'. I would only want to show Home | About| and Street Bike and Street Bike child pages. Vice Versa as well.
I found a way to do this in the codex, but not when the navigation is sandox_globalnav in the theme's functions.
I'll list the code for you:
<?php
// Produces a list of pages in the header without whitespace -- er, I mean negative space.
function sandbox_globalnav() {
echo '<div id="menu"><ul>';
echo '<li';
if ( is_home() ) {
echo ' class="current_page_item"';
}
echo '><a href="' . get_settings('siteurl') . '">Home</a></li>';
$menu = wp_list_pages('title_li=&sort_column=menu_order&depth=1&echo=0'); // Params for the page list in header.php
echo str_replace(array("\r", "\n", "\t"), '', $menu);
echo "</ul></div>\n";
}
The code in header.php:
<div id="access">
<?php sandbox_globalnav() ?>
</div><!-- #access -->
I'm not sure how to alter wp_list_pages in this case.
Hope that's clearer,
-Steve