Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #1461434

    Hi
    Is it possible to create a 2 times drop down menu in the leftside bar menu?
    Like:
    > Collectie ( dropdown )
    >Beschilderde oesterschelpen ( drop down )
    > Beach

    http://www.zeeuwsemeisjesdreischor.nl

    Tnx!
    Greetz
    Karin

    #1461489

    Hey leloux,
    Thank you for your patience, but I didn’t find a way to achieve this, since this menu structure is not a option in the theme it will more involved.
    If you would like to request this feature the Dev Team has opened a new Github Feature Request for users to place requests like this and follow them as the Dev Team reviews them.

    Best regards,
    Mike

    #1461497

    Wouldn’t this be an alternative? https://basis.webers-testseite.de/blog/
    I think you could also make it so that the hamburger is always open or is open at the start. The advantage of the hamburger menu is that it fulfills your requirement for 2nd level menu items.
    That would be possible with board resources as you can see

    #1461499

    Hi,
    That is a good idea Guenni007, but I’m not sure how the burger menu could replace the sidebar header menu, I don’t think that forcing the burger menu to always be open would be the same design. Do you have an idea the replace the menu with the burger menu, maybe like this?

    function av_different_menu( $args = '' ) {
      if($args['theme_location'] === 'avia2') {
          $args['menu'] = '11';
      } 
      return $args;
      }
    add_filter( 'wp_nav_menu_args', 'av_different_menu' );

    Best regards,
    Mike

    #1461500

    Why replacement – just use it as it is – starting from header: logo right – menu left
    The rest is a little quick css. I think it’s almost better the way it is now. Because let’s face it – navigation is a necessary evil. The less it hides the content, the better.
    you can see that social bookmarks or even widgets can be placed inside hamburger overlay quite well here: https://pureinstall.webers-testseite.de/

    #1461502

    Hi,
    Well I don’t know, leloux really wants a sidebar header menu like this:
    Enfold Support 6265
    and this menu doesn’t behave the same as a burger menu, and I have not found a way to do this. If you have an idea how to do this that would be great.
    I don’t understand your example because it doesn’t display like a sidebar header menu, perhap you call the menu in the screenshot something else and I’m not explaining well.

    Best regards,
    Mike

    #1461516

    OK. i try to modify the sidebar header menu.

    how to prevent standard hover behaviour?
    i tried preventDefault() or unbind mouseenter mouseover but nothing seems to work.
    if we can hamper that. then we can position the submenu under their parent and with slideToggle we can open them ( on click or hover)
    But first we had to solve to prevent default hover event

    #1461531

    Hi,
    Please see this thread that I offered to change sub menu items in sidebar menu to drop down, and from this they are asking to create a second level drop down like in the mobile menu.

    Best regards,
    Mike

    #1461646

    Hi,
    I believe that I have found a solution to change the sidebar header menu to have multiple dropdowns like the burger menu,
    Enfold Support 6271
    for example this is the first dropdown after a click:
    Enfold Support 6267
    this is the second level after click:
    Enfold Support 6269
    please note that both the “first level” and “second level” menu items are not links to pages, so a click will open the sub-menu:
    Enfold Support 6273
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function change_sidebar_menu_to_burger_menu_dropdown() { ?>
      <script>
    document.addEventListener("DOMContentLoaded", function() {
        var screenWidth = window.innerWidth;
        if (screenWidth >= 768) {
            if (document.documentElement.classList.contains("html_header_sidebar")) {
                const aviaMenu = document.getElementById("avia-menu");
                if (aviaMenu) {
                    aviaMenu.id = "av-burger-menu-ul";
                    aviaMenu.classList.remove("av-main-nav");
                    aviaMenu.classList.remove("menu");
                }
                const menuItems = document.querySelectorAll("#av-burger-menu-ul .menu-item");
    
                menuItems.forEach(function(item) {
                    item.classList.add("av-active-burger-items");
                    item.classList.remove("menu-item");
                });
                const menuItemsWithChildren = document.querySelectorAll("#av-burger-menu-ul .menu-item-has-children");
    
                menuItemsWithChildren.forEach(function(item) {
                    item.classList.add("av-width-submenu");
                    //item.classList.remove("menu-item-has-children");
    
                    const dropdownAva = item.querySelector(".menu-item-has-children.av-width-submenu .avia-menu-text");
                    if (dropdownAva) {
                        const dropdownAvailable = document.createElement("span");
                        dropdownAvailable.classList.add("dropdown_available");
                        dropdownAva.insertAdjacentElement('afterend', dropdownAvailable);
                    }
                    const dropdownSpan = item.querySelector(".menu-item-has-children.av-width-submenu .dropdown_available");
                    if (dropdownSpan) {
                        const submenuIndicator = document.createElement("span");
                        submenuIndicator.classList.add("av-submenu-indicator");
                        dropdownSpan.insertAdjacentElement('afterend', submenuIndicator);
                    }
                });
    
                const style = document.createElement('style');
                style.innerHTML = `
                    #top #av-burger-menu-ul {
                        width: 300px;
                        padding: 0px 30px;
                    }
                    .main_menu ul:first-child>li a {
                        height: 50px;
                        line-height: 50px;
                    }
                `;
                document.head.appendChild(style);
            }
        }
    });
    </script>
      <?php
    }
    add_action( 'wp_footer', 'change_sidebar_menu_to_burger_menu_dropdown', 99 );

    Please disable any previous snippets from this thread.

    Best regards,
    Mike

    #1461683

    Hi Mike
    I dont know if i did it allright but the first level as the second level dont appear as a dropdown menu unfortunately…
    I put the login credentials in the private content.
    Greetz
    Karin

    #1461695

    Hi Mike
    screenshot

    • This reply was modified 2 months, 4 weeks ago by leloux.
    #1461697

    Hi Mike
    This is a link to a example of the left side bar menu i want..

    Greetz
    Karin

    #1461698

    Hi Mike
    I put everything back to first css text in de functions php ( to create a drop down menu in the left side bar menu )
    I hope you can help me with the example above to create finally a burgermenu in the left side bar menu with arrows )
    Greetz
    Karin

    #1461709

    Hi,
    Thanks for the login, I found that the setting Menu Icon Submenu Items ▸ Display submenu items on click should be set, I did this for you:
    Enfold Support 6275
    Now the multiple dropdowns work:
    Enfold Support 6277
    but for some of your top menu items like Beelden you need to change it to a # and add the link below, otherwise clicking it will only open the sub-menu and not go to the page, The same way Collectie is.

    Best regards,
    Mike

    #1461762

    Hi Mike
    Tnx!
    How can i change the font of the drop down menus?
    And it seems by clicking on a menu item that i first see the “old”menu…

    Greetz
    Karin

    #1461790

    Hi,
    When I checked your site the code above had been removed, I added it back again and now it is working.
    The font-family looks to be the same for all of the menu items, I adjusted the color of the sub-menu items to match the parent in case that is what you meant.

    Best regards,
    Mike

    #1461855

    Hi Mike
    Tnx for your help so far..
    I want the font for the burger menu adjust to Rift3..( adobe ); all of the menu items…
    How can i realize this?
    I used use any font to upload this font and it works with h1,h2, etc. but not for the menu …
    Can you help me for the last time?

    Greetz
    Karin

    #1461861

    Hi,
    When I check your H tags & your menu items they all look to be Rift4 is this what you mean?
    I see you are using a font plugin that I have not used, I recommend using the theme setting to upload custom fonts Enfold Theme Options ▸ Import/Export ▸ Custom Font Manager and then change the menu font in the theme setting Enfold Theme Options ▸ Advanced Styling ▸ Menu items
    Please see our documentation here.

    Best regards,
    Mike

    #1461915

    Hi Mike
    Tnx for your answer but that does not work for me…
    The fonts are all again in comfortaa.
    Isn’t there a css that i can put in the quick css?

    greetz
    Karin

    #1461924

    Hi Mike
    I managed to change the font to rift in the burger menu and also could change the font size, so for now it’s good for me and i can go on…
    Thank you for all your help!
    Greetz Karin
    Have a nice weekend!

    #1461934

    Hi,
    Glad to hear that you have this sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘2 times drop down menu in left side bar menu’ is closed to new replies.