Support » Alpha/Beta/RC » Can I get all user-created menus at once?

  • Is there a way I can get all the available user-created menus at once rather than calling them each by individual name or id?

Viewing 1 replies (of 1 total)
  • Anything patently stupid about doing it this way?

    <?php
    
    $menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) );
    
    foreach ( $menus as $menu ):
    
    ?>
    	<ul class="menu-class">
      		<a href="#" class="menu-title"><?php echo $menu->name; ?></a>
    		<?php wp_nav_menu(array('menu' => $menu));?>
    	</ul>
    
    <?php endforeach; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Can I get all user-created menus at once?’ is closed to new replies.