How to Change Menu Colors in the Twenty Twenty Theme with Custom CSS
Content
One of the most common customization requests for the Twenty Twenty theme is changing the default red accent color used in the main navigation menu. While the theme's built-in Customizer offers some color options, many users find they need more granular control, especially for sub-menus, mobile views, and specific elements like dropdown arrows.
Why You Need Custom CSS
The Twenty Twenty theme uses a specific set of CSS selectors to style its navigation elements. The default color options in the Customizer (Appearance > Customize > Colors) are limited and do not always cover all parts of the menu, particularly on mobile devices or within complex dropdown structures. This is why adding your own CSS code is often the most effective and permanent solution.
Common Solutions and CSS Code Snippets
1. Changing Main Menu Link Color
To change the color of the top-level menu items (e.g., from red to black), add the following CSS to Appearance > Customize > Additional CSS:
body:not(.overlay-header) .primary-menu > li > a {
color: #000000 !important;
}
2. Changing Dropdown Menu Arrow Color
The small arrow next to menu items that have submenus can be styled separately:
.primary-menu > li > .icon {
color: #000000 !important;
}
3. Styling the Dropdown Submenu Background
To change the background color of the dropdown submenu itself:
body:not(.overlay-header) .primary-menu ul {
background-color: #139576;
}
4. Styling the Submenu Arrow (The Pointer)
The small triangular pointer that connects the dropdown to the main menu requires a different selector:
body:not(.overlay-header) .primary-menu > li > ul::after {
border-bottom-color: #139576;
}
5. Changing Mobile Menu Toggle Icons
On tablet and mobile views, the 'menu' text and the three-dot icon can be styled with this code:
.header-toggles .toggle {
color: #ff9500 !important;
}
Important Notes and Troubleshooting
- Use !important Sparingly: The
!importantrule is used in these examples to override the theme's default styles. While effective, it should be used carefully to avoid future styling conflicts. - Check Your Theme: As seen in the sample threads, users sometimes mistake issues with other themes (like Astra) for Twenty Twenty problems. Always confirm you are using the correct theme.
- Browser Developer Tools are Your Friend: The most reliable way to find the correct CSS selector for an element is to use your browser's inspect tool. Right-click the element you want to change and select 'Inspect' to see its classes and IDs.
By using these targeted CSS snippets, you can gain full control over your Twenty Twenty theme's menu appearance without needing to edit theme files directly.
Related Support Threads Support
-
Change menu background color?https://wordpress.org/support/topic/change-menu-background-color-6/
-
Custom menu colorhttps://wordpress.org/support/topic/custom-menu-color-2/
-
menu color changehttps://wordpress.org/support/topic/menu-color-change-4/
-
Make SVG Icons the same background Color as on the Footerhttps://wordpress.org/support/topic/make-svg-icons-the-same-background-color-as-on-the-footer/
-
Drop down menu changes colors randomlyhttps://wordpress.org/support/topic/drop-down-menu-changes-colors-randomly/
-
seperate header colorshttps://wordpress.org/support/topic/seperate-header-colors/
-
Change color of dropcaphttps://wordpress.org/support/topic/change-color-of-dropcap/
-
How to change menu button color?https://wordpress.org/support/topic/how-to-change-menu-button-color/
-
need to change background color and font size and color in menushttps://wordpress.org/support/topic/need-to-change-background-color-and-font-size-and-color-in-menus/
-
Meny Color and sizehttps://wordpress.org/support/topic/meny-color-and-size/
-
RE: color of selection on drop down menuhttps://wordpress.org/support/topic/re-color-of-selection-on-drop-down-menu/
-
Menu Text Block Colorshttps://wordpress.org/support/topic/menu-text-block-colors/
-
Change drop down menu background colourhttps://wordpress.org/support/topic/change-drop-down-menu-background-colour/
-
Changing the red colour of the menu and the headershttps://wordpress.org/support/topic/changing-the-red-colour-of-the-menu-and-the-headers/
-
Menu drop down arrowhttps://wordpress.org/support/topic/menu-drop-down-arrow-2/
-
Change menu fonthttps://wordpress.org/support/topic/change-menu-font-13/
-
Archive Drop down colour changehttps://wordpress.org/support/topic/archive-drop-down-colour-change/
-
Mobile Menu Submenu Arrow Colorhttps://wordpress.org/support/topic/mobile-menu-submenu-arrow-color/
-
Change colour of the font of the product description under image.https://wordpress.org/support/topic/change-colour-of-the-font-of-the-product-description-under-image/
-
Color of Magnifying Glass and Mobile Menuhttps://wordpress.org/support/topic/color-of-magnifying-glass-and-mobile-menu/
-
Twenty-Twenty Theme | Header and Drop Down colour issueshttps://wordpress.org/support/topic/twenty-twenty-theme-header-and-drop-down-colour-issues/
-
Tablet/Mobile Menu change colorhttps://wordpress.org/support/topic/tablet-mobile-menu-change-color/
-
How to change the color of a sub-categoryhttps://wordpress.org/support/topic/how-to-change-the-color-of-a-sub-category/
-
mobile menu font colorhttps://wordpress.org/support/topic/mobile-menu-font-color-3/
-
Sub Menu Trianglehttps://wordpress.org/support/topic/sub-menu-triangle/
-
Shadow on menu wordinghttps://wordpress.org/support/topic/shadow-on-menu-wording/
-
Change the red color in menu and buttonshttps://wordpress.org/support/topic/change-the-red-color-in-menu-and-buttons/
-
Color of Magnifying Glass and Mobile Menuhttps://wordpress.org/support/topic/color-of-magnifying-glass-and-mobile-menu-2/
-
How to change the color of the menu, home, about the blog, contact …https://wordpress.org/support/topic/how-to-change-the-color-of-the-menu-home-about-the-blog-contact/
-
Color change in menu barhttps://wordpress.org/support/topic/color-change-in-menu-bar/
-
sub-menu colours: remove black border?https://wordpress.org/support/topic/sub-menu-colours-remove-black-border/
-
Change Menu Font Color (Twenty Twenty Theme)https://wordpress.org/support/topic/change-menu-font-color-twenty-twenty-theme/
-
Change the color only of mobile menuhttps://wordpress.org/support/topic/change-the-color-only-of-mobile-menu/
-
CSS Selectorshttps://wordpress.org/support/topic/css-selectors-21/
-
Change Font Style Pleasehttps://wordpress.org/support/topic/change-font-style-please/
-
Change the Color of the black submenu arrowhttps://wordpress.org/support/topic/change-the-color-of-the-black-submenu-arrow/
-
The menu in headerhttps://wordpress.org/support/topic/the-menu-in-header/
-
sub-menu background color and font colorhttps://wordpress.org/support/topic/sub-menu-background-color-and-font-color/