Get a list of WordPress menus

Quick bit of code to get a list of WP menus:

$menus = get_terms('nav_menu');
foreach($menus as $menu){
  echo $menu->name . " n";

(just so I remember for next time)

2 thoughts on “Get a list of WordPress menus

Leave a Reply

Your email address will not be published. Required fields are marked *