Log1x / navi

A developer-friendly alternative to the WordPress NavWalker.
https://github.com/Log1x/navi
MIT License
311 stars 29 forks source link

An example of multiple menus? #44

Closed sabelapaulo closed 3 years ago

sabelapaulo commented 3 years ago

I was wondering how we might implement a menu that has two or more menus? For example, a primary menu then also a menu for mobile only and perhaps another type of menu in the footer whereas the html output for each is different.

Log1x commented 3 years ago

Simply create a new instance of a menu and use it as you would normally.

$otherNavigation = (new Navi())->build('other_navigation');