add to your function.php file the following code :
// my custom menu function mymenu_get_menu_items($menu_name){ if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) { $menu = wp_get_nav_menu_object( $locations[ $menu_name ] ); return wp_get_nav_menu_items($menu->term_id); } }
then in a template file in a place where the menu need to be displayed :
$menu_items = yourmenu_get_menu_items('your-menu-location'); // replace your-menu-location by desired location if(isset($menu_items)) { echo '<ul>'; foreach ( (array) $menu_items as $key => $menu_item ) { echo '<li><a href="'.$menu_item->url.'" title="'.$menu_item->title.'">'.$menu_item->title.'</a></li>'; } echo '</ul>'; }