Skip to content

palmtreephp/wp-navmenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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