Tweak for collapsible navigation menus on mobile
-
The one failing of the default WP nav block for us is that for on mobile sub-menus are not collapsible. Options for Block Themes v1.3.4 added an option for expandable submenus to the Navigation Block modal.
This additional feature works nicely and we have implemented this plugin on our site – just to have collapsible sub-menus when the site is viewed on a mobile device. Thank you.
With the default long form menu blocks we used a little bit of global CSS to highlight the parent menu if a sub-menu is active. We do this as it gives the visitor a visual cue if they are in a submenu item. We did this with the following CSS – it continues to work on the desktop version.
”’
/* Ollie Navigation – Highlight parent page link when on child page */
.wp-block-navigation-item:has(.current-menu-item) {
color: #4D34FA !important;
}
”’Wonder if its possible to add to our CSS to make this happen when also using the Options for Block Themes plugin – so if the active page is a sub-menu page the parent menu page is also highlighted?
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.