oh wait! i forgot to make the other exclude=THE,IDs,OF,THE,PAGES,YOU,WANT,TO,EXCLUDE,COMMA,DELIMITED')
i had also submenus.. how can i add them on your code?
<nav>
<ul id="main-nav" class="main-nav">
<?php
wp_list_pages('title_li=&include=THE,IDs,OF,THE,PAGES,YOU,WANT,TO,INCLUDE,COMMA,DELIMITED');
query_posts('cat=23&posts_per_page=1');
if(have_posts());
while(have_posts()) :
the_post();
?>
<li>
<a href="<?php echo get_permalink(); ?>">LATEST POST</a>
</li>
<?php
endwhile;
wp_reset_query();
?>
</ul>
</nav>
Try that. Obviously change where it says ‘THE,IDs,OF,THE,PAGES,YOU,WANT,TO,INCLUDE,COMMA,DELIMITED’ to the IDs of the pages you want to include.
The above should also support sub-menus.
and how can i add the submenus? sorry if i’m too strenuous
If you make pages children of the pages that are included in the nav, they should automatically be added as sub-menus.
Thank you so much! it worked! i wanted that for very long time but i couldn’t find anything!
Thank you again! 🙂