Easily add icons to Navigation Block items in WordPress.
Try it in WordPress Playground — test the plugin instantly in your browser, no installation required.
Recommended Companion Plugin: Use the Icon Block plugin to add custom icon sets and expand your icon library options. Icon Block is a powerful companion that allows you to register additional icon libraries for use with Enable Navigation Icons.
- Icon Library - Browse and select from a curated collection of WordPress icons
- Media Library - Upload and use custom SVG icons from your media library
- Custom SVG - Paste custom SVG code directly for complete flexibility
- Left/Right Placement - Position icons before or after navigation link text
- Space Between - Justify content with space between icon and text for full-width layouts
- Vertical Alignment - Align icons to top, center, or bottom for multi-line menu items
- Vertical Offset - Fine-tune icon position with a vertical offset (supports px, %, em, rem units)
- Icon Size - Adjust icon dimensions with a slider control (supports px, em, rem units)
- Icon Spacing - Control the gap between icon and text (supports px, em, rem units)
- Icon Color - Choose from theme colors or set a custom color
- No Fill Option - Support for stroke-based icons (e.g., Lucide icons)
Set default icon settings at the Navigation block level that apply to all child navigation items:
- Global Defaults - Configure size, spacing, color, position, vertical alignment, offset, and styling once for the entire navigation
- Item-Level Overrides - Individual navigation items can inherit defaults or use custom settings
- Nested Support - Works seamlessly with multiple and nested Navigation blocks
- Menu Support - Applies to both inline navigation items and dynamically loaded WordPress menus
This feature streamlines icon management for large navigation menus by eliminating repetitive configuration while maintaining flexibility for individual items.
Full support for the Ollie Menu Designer plugin's mega menu dropdown items:
- Mega Menu Compatibility - Add icons to Ollie mega menu dropdown navigation items
- Consistent Experience - Same icon selection and styling options as standard navigation items
- Theme Integration - Works seamlessly with Ollie themes and the Menu Designer plugin
core/navigation- Navigation block (for setting default icon settings)core/navigation-link- Standard navigation linkscore/navigation-submenu- Submenu/dropdown navigation itemsollie/mega-menu- Ollie Menu Designer dropdown menu items (requires Ollie Menu Designer plugin)
- WordPress 6.3 or higher
- PHP 7.4 or higher
- Download the plugin zip file
- Go to Plugins > Add New in your WordPress admin
- Click Upload Plugin and select the zip file
- Activate the plugin
- Add or edit a Navigation block in the block editor
- Select a navigation link or submenu item
- Click Add icon in the block toolbar
- Choose an icon from the library, upload from media, or paste custom SVG
- Adjust icon settings in the block sidebar:
- Toggle icon position (left/right)
- Enable space between justification
- Set icon size and spacing
- Set vertical alignment and offset
- Choose icon color
- Enable "No icon fill" for stroke-based icons
To apply consistent icon settings across all navigation items:
- Select the Navigation block (parent container)
- Open the block settings sidebar
- Configure Default Icon Settings:
- Set default icon size
- Set default icon spacing
- Choose default icon color
- Set default icon position (left/right)
- Set default vertical alignment (top/center/bottom)
- Set default vertical offset
- Enable default space between justification
- Enable "No icon fill" for stroke-based icons by default
- All navigation items will inherit these settings automatically
Individual navigation items can override Navigation block defaults:
- Select a navigation link or submenu item
- In the block sidebar, locate Icon Settings
- Toggle off Use default icon settings
- Configure custom settings for this specific item
When "Use default icon settings" is enabled (default), the item inherits all settings from the parent Navigation block. When disabled, the item uses its own custom settings.
If you're using the Ollie Menu Designer plugin for mega menus:
- Add an Ollie mega menu dropdown block to your navigation
- Select the mega menu dropdown item
- Click Add icon in the block toolbar (same as standard navigation items)
- Configure icon settings in the block sidebar
Ollie mega menu items work exactly like standard navigation items and fully support all icon features including default settings inheritance from the parent Navigation block.
# Install dependencies
npm install
# Start development build with watch
npm start
# Build for production
npm run build
# Launch WordPress Playground with plugin
npm run playgroundThis plugin was inspired by and incorporates code and ideas from the enable-button-icons project. Special thanks to @ndiego for his excellent work on button icon functionality, which served as a foundation for implementing navigation icon features.
GPLv2 or later. See LICENSE for details.