palmtree / wp-navmenu
WordPress nav menu component for Palmtree PHP
v1.0.0
2021-03-07 10:23 UTC
Requires
- php: >=7.1
- palmtree/collection: ^3.0|^4.0
Requires (Dev)
README
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.
Requirements
- PHP >= 7.1
Installation
Use composer to add the package to your dependencies:
composer require palmtree/wp-cleaner
Usage
<?php $collection = new \Palmtree\WordPress\NavMenu\NavMenuCollection(); $collection->set('header', 'Header Nav');
<nav class="navbar navbar-default"><?= $collection->renderMenu('header'); ?></nav>
License
Released under the MIT license