I have a bunch of pages and I only want to include 2 or 3 pages on my main menu. How would I do that? Currently my code looks like this:
wp_page_menu('include=156,572,542&sort_column=menu_order&echo=0');
If I am going to insert exclude=x pages, it wouldn't make sense because there's just too many of them.
Please no plugin recommendation. I've tried some but they conflict with other things I do in this regard.
UPDATE Here's the full function:
function main_nav() {?>
<div id="access">
<div id="sub-access">
<div id="sub-sub-access">
<div class="skip-link"><a href="#content">"><?php _e('Skip to content', 'thematic'); ?></a></div>
<?php echo preg_replace('/<ul>/', '<ul class="sf-menu">', wp_page_menu('include=11,13,7,9,4&sort_column=menu_order&echo=0'), 1);?>
</div>
</div>
</div><!-- #access --> <?php
}
add_action('thematic_header','main_nav',9);
It's a custom version of Thematic's thematic_access() function. I don't know why it's behaving this way. I tried it on a new installation, it doesn't work still.
includewill make the menu show only the pages you specify, andexcludewill make the menu show all pages except the ones you specify. So you can't have both arguments. – One Trick Pony Dec 17 '10 at 16:40