Navigation Block Controls turns submenus in the core Navigation block into tap-to-open dropdowns on small screens, with an arrow that flips when the submenu is open. It handles the behavior; how the menu looks is still up to your theme or your own CSS.
Before you start
- WordPress 5.8 or later
- PHP 5.6 or later
- A site that uses the core Navigation block for its menu
Install
- In your WordPress dashboard, go to Plugins → Add New Plugin.
- Click Upload Plugin.
- Choose the plugin zip file.
- Click Install Now.
- Click Activate.
How to use
There’s nothing to set up. Once the plugin is active, it works on every Navigation block on your site’s front end. There are no settings and no new blocks.
See it in action
- Make sure your Navigation block has at least one item with a submenu.
- View your site on a phone, or narrow your browser window to under 600px wide.
- Open the mobile menu.
- Tap the arrow next to a menu item to open its submenu. Tap it again to close it.
What changes on small screens
- Submenus start closed inside the open mobile menu.
- The submenu arrow is always visible, shown a bit larger, and rotates when its submenu is open.
- Open submenus take the full width under their parent item.
On wider screens, the plugin leaves your Navigation block alone.
Developer reference
Coming soon: the hooks, filters and functions you can use with this plugin from your theme or a code snippet.
FAQs
Can I change the screen width where this kicks in?
Not from a setting. The tap behavior runs on screens 599px wide and below, which lines up with when the core Navigation block switches to its mobile menu by default.
Can I restyle the dropdowns?
Colors come from the Navigation block itself: set Submenu & overlay text and Submenu & overlay background in its Color settings. For anything else, use CSS. The plugin adds the class collapsible-active to a menu item while its submenu is open, so you can target open items in your theme or custom CSS.