Is it possible to have WordPress generate this type of unordered list?
<ul id="nav1">
<li><a href="#">item1</a></li>
<li><a href="#">item2</a>
<ul id="nav2">
<li><a href="#">subitem1</a></li>
</ul></li>
<li><a href="#">item3</a></li>
</ul>
Obviously I can do the following:
<ul id="nav1">
<?php wp_list_pages(); ?>
</ul>
But my question is, how do I make it so that I can have a secondary ul under a page (or list item such as ‘item2’ above)?
Basically, I’m looking for a way for WordPress to dynamically generate the following:
<li><a href="#">item2</a>
<ul>
<li><a href="#">subitem1</a></li>
</ul></li>
And I can use JQuery if necessary to give the secondary (sub menu) unordered list an id of #nav2…
Anyway, is this possible?
Thanks and I appreciate all of your help!
Amit
Nevermind guys.
I just tried it with the wp_list_page(); function and it works. It does exactly as I wanted it to with exception to one thing…
It put’s an extra <ul> in there so the list looks something like this:
Anyone know how to get rid of the <ul> following the Pages title, as well as NOT show the word Pages?
Thanks, Amit