This guide explains how to customize the appearance of the Priority Plus Navigation dropdown menu and toggle button.
The Priority Plus Navigation plugin provides two ways to customize styling:
- Block Inspector Controls (Recommended) - Use the sidebar panels for per-block customization with live preview
- Theme.json - Set site-wide defaults that apply to all Priority Plus Navigation blocks
Block-level customizations always take priority over theme.json defaults.
The easiest way to customize your navigation is through the block inspector sidebar.
Found under the Styles tab:
Priority Plus Settings
- Button Label: Text displayed on the "More" button (default: "More")
- Mobile Collapse: Toggle to collapse all items into the button at the mobile breakpoint
Priority Plus Button Colors
- Text Color: Color of the button text
- Text Hover Color: Color when hovering over the button
- Background Color: Background color of the button
- Background Hover Color: Background when hovering
Priority Plus Button Spacing
- Padding: Internal spacing using theme spacing sizes or custom values
Priority Plus Button Border
- Border: Color, width, and style with per-side support (top, right, bottom, left)
- Border Radius: Corner radius with per-corner support
Click the Customize Dropdown Menu button in the Priority Plus Settings panel to open a modal with live preview:
- Menu Colors: Background, item hover background, item text color, item hover text color
- Menu Styles: Border (with per-side control), border radius, box shadow presets
- Submenu Colors: Background, item hover background, item text color, item hover text color (for nested accordion items)
- Menu Items: Item padding, submenu indent, item separator (color, width, style)
For site-wide defaults, add the following to your theme's theme.json file:
{
"version": 3,
"settings": {
"custom": {
"priorityPlusNavigation": {
"dropdown": {
"backgroundColor": "#f0f0f0",
"borderColor": "#999999",
"borderWidth": "2px",
"borderStyle": "solid",
"borderRadius": "8px",
"boxShadow": "0 8px 16px rgba(0, 0, 0, 0.2)",
"itemSpacing": "1rem 1.5rem",
"itemHoverBackgroundColor": "rgba(0, 0, 0, 0.08)",
"itemHoverTextColor": "#007cba",
"multiLevelIndent": "1.5rem"
}
}
}
}
}Only specify the properties you want to customize. All properties are optional.
| Property | Description | Default Value |
|---|---|---|
backgroundColor |
Background color of the dropdown menu | #ffffff |
borderColor |
Border color of the dropdown menu | #dddddd |
borderWidth |
Width of the dropdown border | 1px |
borderStyle |
Style of the dropdown border | solid |
borderRadius |
Corner radius of the dropdown | 4px |
boxShadow |
Shadow effect for the dropdown | 0 4px 12px rgba(0, 0, 0, 0.15) |
Per-side borders: The block inspector supports per-side border control (top, right, bottom, left). For theme.json, per-side borders can be set using:
| Property | Description |
|---|---|
borderTop |
Full border shorthand for top side (e.g., 2px solid #ddd) |
borderRight |
Full border shorthand for right side |
borderBottom |
Full border shorthand for bottom side |
borderLeft |
Full border shorthand for left side |
| Property | Description | Default Value |
|---|---|---|
itemSpacing |
Padding around each dropdown item | 0.75rem 1rem |
itemTextColor |
Text color for menu items | #191919 |
itemHoverBackgroundColor |
Background color when hovering over an item | rgba(0, 0, 0, 0.05) |
itemHoverTextColor |
Text color when hovering over an item | #191919 |
| Property | Description | Default Value |
|---|---|---|
itemSeparatorColor |
Color of the border between items | transparent |
itemSeparatorWidth |
Width of the border between items | 0 |
itemSeparatorStyle |
Style of the border between items | solid |
These colors apply to nested accordion items (items within expanded submenus):
| Property | Description | Default Value |
|---|---|---|
submenuBackgroundColor |
Background color for submenu areas | #ffffff |
submenuItemTextColor |
Text color for submenu items | #191919 |
submenuItemHoverBackgroundColor |
Hover background for submenu items | rgba(0, 0, 0, 0.05) |
submenuItemHoverTextColor |
Hover text color for submenu items | #191919 |
Note: The submenu background color only applies to first-level submenus to prevent alpha transparency stacking when using semi-transparent colors.
| Property | Description | Default Value |
|---|---|---|
multiLevelIndent |
Indentation for nested submenu levels | 1.25rem |
Here's a complete example showing all available properties:
{
"version": 3,
"settings": {
"custom": {
"priorityPlusNavigation": {
"dropdown": {
"backgroundColor": "#f8f9fa",
"borderColor": "#dee2e6",
"borderWidth": "2px",
"borderStyle": "solid",
"borderRadius": "8px",
"boxShadow": "0 8px 16px rgba(0, 0, 0, 0.2)",
"itemSpacing": "1rem 1.5rem",
"itemTextColor": "#333333",
"itemHoverBackgroundColor": "rgba(0, 0, 0, 0.08)",
"itemHoverTextColor": "#0066cc",
"itemSeparatorColor": "#e0e0e0",
"itemSeparatorWidth": "1px",
"itemSeparatorStyle": "solid",
"submenuBackgroundColor": "#f0f0f0",
"submenuItemTextColor": "#444444",
"submenuItemHoverBackgroundColor": "rgba(0, 0, 0, 0.1)",
"submenuItemHoverTextColor": "#0066cc",
"multiLevelIndent": "1.5rem"
}
}
}
}
}The plugin uses a three-layer CSS custom property system:
The plugin sets default values on :root so they're always available:
:root {
--wp--custom--priority-plus-navigation--dropdown--background-color: #fff;
--wp--custom--priority-plus-navigation--dropdown--border-color: #ddd;
/* ... etc */
}WordPress generates CSS custom properties from your theme.json on the body selector, which overrides the plugin defaults through CSS cascade:
body {
--wp--custom--priority-plus-navigation--dropdown--background-color: #f0f0f0;
--wp--custom--priority-plus-navigation--dropdown--border-color: #999;
/* ... etc */
}When you customize via the block inspector, values are set as inline styles on the <nav> element, which has the highest specificity.
To keep stylesheets readable, the plugin maps the long --wp--custom-- names to short --ppn-dropdown-* aliases via a shared SCSS mixin:
// Short alias → long WordPress custom property
--ppn-dropdown-bg: var(--wp--custom--priority-plus-navigation--dropdown--background-color);
--ppn-dropdown-radius: var(--wp--custom--priority-plus-navigation--dropdown--border-radius);
// ... etcThese aliases are defined once in _variables.scss and included in both the frontend and editor stylesheets.
- Plugin Defaults (
:rootselector in plugin CSS) - Theme.json (
bodyselector from WordPress) - Block Inspector (inline styles on the
<nav>element — highest priority)
Remove borders and shadows for a minimal look:
{
"settings": {
"custom": {
"priorityPlusNavigation": {
"dropdown": {
"borderWidth": "0",
"boxShadow": "none"
}
}
}
}
}Add more spacing and shadow for a card-like appearance:
{
"settings": {
"custom": {
"priorityPlusNavigation": {
"dropdown": {
"borderRadius": "12px",
"boxShadow": "0 10px 25px rgba(0, 0, 0, 0.1)",
"itemSpacing": "1.25rem 1.5rem"
}
}
}
}
}Increase contrast for better accessibility:
{
"settings": {
"custom": {
"priorityPlusNavigation": {
"dropdown": {
"backgroundColor": "#000000",
"borderColor": "#ffffff",
"borderWidth": "2px",
"itemTextColor": "#ffffff",
"itemHoverBackgroundColor": "#ffffff",
"itemHoverTextColor": "#000000"
}
}
}
}
}Add visible dividers between menu items:
{
"settings": {
"custom": {
"priorityPlusNavigation": {
"dropdown": {
"itemSeparatorColor": "#e0e0e0",
"itemSeparatorWidth": "1px",
"itemSeparatorStyle": "solid"
}
}
}
}
}You can reference WordPress color and spacing presets in theme.json:
{
"settings": {
"custom": {
"priorityPlusNavigation": {
"dropdown": {
"backgroundColor": "var(--wp--preset--color--base)",
"borderColor": "var(--wp--preset--color--contrast)",
"itemSpacing": "var(--wp--preset--spacing--30)"
}
}
}
}
}If you need even more control, you can write custom CSS targeting the dropdown elements:
/* In your theme's style.css or custom CSS */
.is-style-priority-plus-navigation .priority-plus-navigation-dropdown {
/* Your custom styles here */
backdrop-filter: blur(10px);
margin-top: 0.5rem;
}
.is-style-priority-plus-navigation .priority-plus-navigation-dropdown li a {
/* Custom item styles */
font-weight: 500;
letter-spacing: 0.025em;
}Note: Custom CSS has the highest priority and will override both plugin defaults and theme.json values.
- Clear WordPress cache - Theme.json is cached by WordPress
- Check file location - Ensure theme.json is in your theme's root directory
- Validate JSON - Use a JSON validator to check for syntax errors
- Check property names - Property names are case-sensitive (use camelCase)
- Enable debugging - Set
WP_DEBUGorSCRIPT_DEBUGtotruein wp-config.php to disable caching
WordPress generates theme.json CSS with the body selector. Make sure:
- Your theme.json is valid JSON
- Property names match exactly (e.g.,
backgroundColor, notbackground-color) - Theme.json version is set to
3
Simply remove the priorityPlusNavigation section from your theme.json, or delete specific properties you want to reset. In the block inspector, use the "Reset to Defaults" button in the dropdown customizer modal.
CSS custom properties (CSS variables) are supported in all modern browsers:
- Chrome 49+
- Firefox 31+
- Safari 9.1+
- Edge 15+