To be able to take advantage of the particular jQuery menu in WordPress, I want the kid UL (dropdown area of the menu) to possess a selector put into it (third line, below):
<li>the first list item
<li>child list item</li>
Note: I omitted the hyperlink code for greater clearness.
Modify <#?php wordpress_list_pages('title_li=&depth=2') ?> within the theme header.php file
[needed to add # to code bit to really make it appear]
Give a function within the theme functions.php file
Mike Little of zed1.com furnished an answer on the LinkedIn forum:
Within the theme functions file:
class My_Master_Page stretches Master_Page amplifier$output, $depth)
Within the header file where menu would be to appear:
<ul class="dropdown"><?php $master = new My_Master_Page
wordpress_list_pages(array('title_li'=>'', 'depth' => 2, 'walker' => $master)) ?></ul>
Mucho gracias to Mike Little, who had been a founding person in the WordPress team.
To include a category towards the
<ul> you should use jQuery, however i think it can be done without adding a category towards the second ul.
To include class
jQuery('ul.dropdown li ul').addClass('sub_nav');
you can now use
jQuery('ul.sub_nav') for anything you requirement for, nevertheless its just like
jQuery('ul.dropdown li ul') therefore it will not make a difference either you add class or otherwise.