Navigation php query
-
Hi all,
I have created a drop down nav using the following php:
// Add ID and CLASS attributes to the first <ul> occurence in wp_page_menu function add_menuclass($ulclass) { return preg_replace('/</ul> <ul>/', '<ul id="main_nav">', $ulclass, 1); } add_filter('wp_page_menu','add_menuclass');This is ok because it adds main_nav to the first ul navigation. My problem is though that I also need to add ul id=sub_nav to the first child of the navigation which Im having some trouble doing, has anyone any suggestions on how I could achieve this?
Thanks in advance!
Kyle
The topic ‘Navigation php query’ is closed to new replies.