WordPress nav menu component for Palmtree PHP
Includes a custom walker to output WordPress menus as Bootstrap v4 nav bars and a collection class which takes care of registering and outputting menus.
- PHP >= 7.1
Use composer to add the package to your dependencies:
composer require palmtree/wp-cleaner
<?php
$collection = new \Palmtree\WordPress\NavMenu\NavMenuCollection();
$collection->set('header', 'Header Nav');
<nav class="navbar navbar-default"><?= $collection->renderMenu('header'); ?></nav>
Released under the MIT license