palmtree/wp-navmenu

WordPress nav menu component for Palmtree PHP

v1.0.0 2021-03-07 10:23 UTC

This package is auto-updated.

Last update: 2024-11-07 19:28:57 UTC


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