PHPackages                             smartlogix/legacy-nav-menu-block - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. smartlogix/legacy-nav-menu-block

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

smartlogix/legacy-nav-menu-block
================================

A Gutenberg block that renders classic WordPress navigation menus via wp\_nav\_menu().

01PHPCI failing

Since Feb 19Pushed 2mo agoCompare

[ Source](https://github.com/namithj/legacy-nav-menu-block)[ Packagist](https://packagist.org/packages/smartlogix/legacy-nav-menu-block)[ RSS](/packages/smartlogix-legacy-nav-menu-block/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Legacy Nav Menu Block
=====================

[](#legacy-nav-menu-block)

A WordPress Gutenberg block that renders classic navigation menus via `wp_nav_menu()`. Designed as a **standalone Composer library** that any theme can include.

Features
--------

[](#features)

- **Menu selector** — pick any registered nav menu from a dropdown
- **Theme location** — dynamically lists locations registered by the active theme via `register_nav_menus()`
- **Container options** — ``, ``, or no wrapper; custom CSS class and `aria-label`
- **Depth control** — limit how many hierarchy levels to render
- **Whitespace** — `preserve` or `discard` whitespace inside the HTML
- **Reusable** — save as a synced pattern for use across the site
- **Server-side rendered** — live preview in the editor via `ServerSideRender`
- **Automatically enables Appearance → Menus** — even in block themes that don't declare `add_theme_support( 'menus' )`

Requirements
------------

[](#requirements)

RequirementMinimumWordPress6.4+PHP7.4+Node.js (development only)20+Installation
------------

[](#installation)

### Via Composer (recommended)

[](#via-composer-recommended)

```
composer require smartlogix/legacy-nav-menu-block
```

Then load Composer's autoloader in your theme's `functions.php` (if you haven't already):

```
require_once __DIR__ . '/vendor/autoload.php';
```

That's it — the block auto-registers via the autoloader. No additional code needed.

### Manual installation

[](#manual-installation)

Download the release `.zip` from [Releases](https://github.com/namithj/legacy-nav-menu-block/releases), extract it into your theme, and require the bootstrap file:

```
require_once get_template_directory() . '/legacy-nav-menu-block/legacy-nav-menu.php';
```

Usage
-----

[](#usage)

Search for **"Legacy Nav Menu"** in the block inserter. Configure via the sidebar:

SettingDescriptionMenuSelect a specific nav menu or auto-select the first oneTheme LocationPick a registered theme location; takes precedence over MenuContainer element`` (default), ``, or noneContainer CSS classCustom class on the container elementContainer aria-labelAccessible label (only for ``)Menu CSS classClass applied to the ``Depth0 = all levels; 1–10 limits hierarchyWhitespacePreserve or discard whitespace in HTML output> **Tip:** If you want theme locations to appear in the block's dropdown, register them with `register_nav_menus()` in your theme as usual. The block fetches available locations dynamically via the REST API.

Development
-----------

[](#development)

```
git clone https://github.com/namithj/legacy-nav-menu-block.git
cd legacy-nav-menu-block
npm install
npm start        # watch mode
npm run build    # production build
npm run lint:js
npm run lint:css
```

Releasing
---------

[](#releasing)

1. Update the version in `composer.json`, `package.json`, `block.json`, and `legacy-nav-menu.php`.
2. Run `npm run build` and commit the updated `build/` directory.
3. Push to `main`, then create a GitHub Release.
4. The Release workflow verifies the build and attaches a `.zip` to the release.
5. Packagist auto-updates via its GitHub webhook.

License
-------

[](#license)

GPL-2.0-or-later — see [LICENSE](LICENSE).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance56

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f306e877645b4ee6e9eb24803569b34b71ae21bb566434790e74bdc3673d2be6?d=identicon)[namithj](/maintainers/namithj)

---

Top Contributors

[![namithj](https://avatars.githubusercontent.com/u/48271037?v=4)](https://github.com/namithj "namithj (1 commits)")

### Embed Badge

![Health badge](/badges/smartlogix-legacy-nav-menu-block/health.svg)

```
[![Health](https://phpackages.com/badges/smartlogix-legacy-nav-menu-block/health.svg)](https://phpackages.com/packages/smartlogix-legacy-nav-menu-block)
```

###  Alternatives

[antwerpes/barcodes-1d

Library for programmatically creating and rendering barcodes

258.7k](/packages/antwerpes-barcodes-1d)[y-ui/laravel-data-masking

A mysql data masking tool with Laravel

293.3k](/packages/y-ui-laravel-data-masking)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
