• Hi guys,

    since we needed sub-menus for your great Sticky Header plugin we simply added them. I would like to hand over our solution to you (Dragan and Slobodan) to check it and maybe include it in your next version.

    For sub-menus in action see qudosoft.de.

    Here is how we made sub-menus work:

    1. Edit “sticky-header/views/public.php” and set argument “‘depth’ => 2” to add the sub-menu (see https://codex.www.ads-software.com/Function_Reference/wp_nav_menu for details).
    2. As this will result in an “broken” Sticky Header layout some additional CSS might be necessary. This is what worked for us. Not sure whether that’s a perfect universal solution:
      /*
       * Sticky Header sub-menu
       */
      #thsp-sticky-header{
        padding-bottom: 0px;
      }
      #thsp-sticky-header .sub-menu {
        margin: 0 auto !important;
        padding: 0 !important;
        position: absolute;
        top: 46px;
        display: none;
        background-color: #fff;
        border: 1px solid #eaeaea;
        border-top: 0px;
        width: 220px;
      }
      #thsp-sticky-header .sub-menu li.menu-item a{
        line-height: normal !important;
        color: #6C6F70 !important;
      }
      #thsp-sticky-header .sub-menu li.menu-item:hover a{
        color: #ffcb05 !important;
      }
      #thsp-sticky-header #thsp-sticky-header-menu > li{
        padding-bottom: 8px;
      }
      #thsp-sticky-header .sub-menu li.menu-item {
       display: block !important;
       text-align: left !important;
       margin: 0px !important;
      }
      #thsp-sticky-header .sub-menu li.menu-item a{
        padding: 15px 20px !important;
      }
      #thsp-sticky-header .menu li:hover .sub-menu {
        display: block;
      }

    https://www.ads-software.com/plugins/sticky-header/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Would like to hand over our submenu hack’ is closed to new replies.