• Resolved audunmb

    (@audunmb)


    I want to have extra navigation (sitemap-like) in the Footer. The default Navigation block have dropdowns for submenus, which doesn’t support a sitemap-like style.

    So I made a CSS workaround which overrides the dropdown. It’s crude, as it relies on !important to override the dropdown, but it works. With it it will display like a regular list with subitems (though no bullets)

    • Toplevel item
      • Submenu item
      • Submenu item
    • Toplevel item

    Maybe you can add this (or a more elegant version) as a block style for Navigation blocks with your plugin.

    Code:

    .is-style-footer-menu .wp-block-navigation__submenu-container {
    	color:inherit !important;
    	border: none !important;
    	background-color: initial !important;
    }
    
    .is-style-footer-menu ul.wp-block-navigation__submenu-container {
    	visibility: visible !important;
    	opacity: initial !important;
    	position: static !important;
    	width: auto !important;
    	height: auto !important;
    	min-width: 200px !important;
    }
    
    .is-style-footer-menu li.wp-block-navigation-item.has-child.wp-block-navigation-submenu{
    	display: block !important;
    }
Viewing 1 replies (of 1 total)
  • Plugin Support Yann

    (@collet)

    Thanks for the feedback. We’ll consider adding this feature in a future release as an additional CSS class for the Navigation block.

    To not rely on !important, you can increase the specificity of the selector. (not sure if it’s more elegant):

    .wp-block-navigation.is-style-footer-menu .wp-block-navigation__container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container {
        color: inherit;
        border: none;
        background-color: initial;
        visibility: visible;
        opacity: initial;
        position: static;
        width: 100%;
        height: auto;
        min-width: auto;
    }
    
    .wp-block-navigation.is-style-footer-menu  .wp-block-navigation-item {
        display: block;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Footer menu with visible submenu items (feature request)’ is closed to new replies.