A Diffrent Type of navigation
-
Hi,
Can anybody help me to write a funtion that display folloing output using to list pages.<ul class="nav-bar topnavbg"> <li class="active"><a href="#">Nav Item 1</a></li> <li class="has-flyout"> <a href="#">Nav Item 2</a> <a href="#" class="flyout-toggle"><span> </span></a> <ul class="flyout"> <!-- The Menues should have sub-menu functionality and they will be listed according to the class below --> <li><a href="#">Sub Nav 1</a></li> <li><a href="#">Sub Nav 2</a></li> <li><a href="#">Sub Nav 3</a></li> </ul> </ul>
I have tried different version but bot work.
Please see an example
function js_list_pages_include_tree(){ $pages = get_pages('title_li=&depth=0'); // Print the children foreach ($pages as $pagg) { echo '<li class="has-flyout"><a href="'.get_page_link($pagg->ID).'">'. $pagg->post_title.'</a>'; echo "<ul class='flyout'>"; wp_list_pages('title_li=&child_of='.get_page_link($pagg->ID).'&depth=1'); echo "</ul>"; echo '</li>'; } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘A Diffrent Type of navigation’ is closed to new replies.