WP Manifestindependent plugin directory
manifest / editor / ace-priority-navigation

Priority Navigation for Block Menu

A Priority+ style "More" dropdown for WordPress block menus.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/acemedia/ace-priority-navigation/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Priority Navigation for Block Menu adds a Priority+ style "More" dropdown to WordPress block menus when the items run out of room.

Installation

  1. Download this repository, or clone it into wp-content/plugins/.
  2. Activate Priority Navigation for Block Menu on the Plugins screen.

How it decides what fits

The plugin works out how much room the menu really has, not how much room its parent happens to have. Many headers put the logo and menu in a group that shrinks to fit, so that group's width follows the menu. The plugin finds the nearest ancestor whose width the page decides, takes off whatever else is in the header at its natural width, and moves the items that do not fit into "More". If it ever cannot trust that measurement on a wide screen, it leaves the menu exactly as WordPress made it rather than hiding it.

Testing

tests/layouts.mjs builds three small header layouts, including the nested logo-and-menu group that once collapsed the whole menu into "More", and checks the menu at several widths and after resizing. It needs Playwright:

npm i -D playwright
node tests/layouts.mjs

Changelog

1.0.5. Fixed the whole menu collapsing into "More" when the menu's parent is a shrink-to-fit group. The room is now measured from the page, items can no longer spill out of the menu's own box, and resizing no longer feeds back into itself. Added the regression test.

Status

This is a development release. I have not yet put it through the WordPress.org review, so expect rough edges and please tell me about them.

Licence

GPL-2.0-or-later. See LICENSE.

Contributing

Bug reports and feature requests are welcome in the GitHub issues. If you would like to send code, please open an issue first so we can talk it through before you spend time on a pull request.

Shane Rounce, Ace Media