{"repo":"Log1x/navi","free":true,"listed":false,"github":"https://github.com/Log1x/navi","clone":"git clone https://github.com/Log1x/navi.git","description":"A developer-friendly alternative to the WordPress NavWalker.","language":"PHP","stars":372,"topics":["wordpress","sage","navwalker","navigation-menu"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"Navi Hate the WordPress NavWalker? Me too . Navi is a developer-friendly alternative to the NavWalker. Easily build your WordPress menus using an iterable object inside of a template/view. Requirements - PHP = 8.0 Installation Bedrock (or Sage) Install via Composer: Manual Download the latest release .zip and install into wp-content/plugins . Usage Building your menu can be done by passing your menu location to Navi::make()- build() : By default, build() uses primary navigation if no menu location is specified. Retrieving an array of menu items can be done using all() : [!NOTE] Check out the examples folder to see how to use Navi in your project. Menu Item Classes By default, Navi removes the default WordPress classes from menu items such as menu-item and current-menu-item giving you full control over your menu markup while still passing through custom classes. If you would like these classes to be included on your menu items, you may call withDefaultClasses() before building your menu: In some situations, plugins may add their own classes to menu items. If you would like to prevent these classes from being added, you may pass an array of partial strings to withoutClasses() match against when building. Accessing Menu Object When building the navigation menu, Navi retains the menu object and makes it available using the get() method. By default, get() returns the raw wp get nav menu object() allowing you to access it directly. Optionally, you may pass a key and default to call","default_branch":null,"files":null,"tree":[],"storefront":"/r/Log1x","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Log1x/navi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}