Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 667 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 667 Bytes

Palmtree WordPress NavMenu

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