1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?php $parentTerms = get_terms('specifications', array('hide_empty' =--> 0, 'parent' =>0)); foreach($parentTerms as $parentTerm) : ?> <ul> <li><a href="<?php echo get_term_link( $parentTerm->slug, $parentTerm->taxonomy ); ?>"><!--?php echo $parentTerm--->name; ?></a> <ul class="megaSubCat"><!--?php $childargs = array( 'hierarchical' =--> 1, 'show_option_none' => '', 'hide_empty' => false, 'parent' => $parentTerm->term_id, 'taxonomy' => 'specifications' ); $children = get_categories($childargs); foreach ($children as $child): ?> <li><a href="<?php echo get_term_link( $child->slug, $child->taxonomy );?>"><!--?php echo $child--->name;?></a></li> <!--?php endforeach; ?--></ul> </li> </ul> <pre><!--?php endforeach; ?--> |
wp_nav_menu()
December 8, 2012/ Updated: December 8, 2012