-
AuthorPosts
-
July 5, 2024 at 10:47 am #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 )
> Beachhttp://www.zeeuwsemeisjesdreischor.nl
Tnx!
Greetz
KarinJuly 6, 2024 at 5:10 pm #1461489Hey 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,
MikeJuly 6, 2024 at 7:42 pm #1461497Wouldn’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 seeJuly 6, 2024 at 7:52 pm #1461499Hi,
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,
MikeJuly 6, 2024 at 8:41 pm #1461500Why 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/July 6, 2024 at 10:08 pm #1461502Hi,
Well I don’t know, leloux really wants a sidebar header menu like this:
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,
MikeJuly 7, 2024 at 7:54 am #1461516OK. 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 eventJuly 7, 2024 at 12:25 pm #1461531Hi,
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,
MikeJuly 9, 2024 at 12:11 am #1461646Hi,
I believe that I have found a solution to change the sidebar header menu to have multiple dropdowns like the burger menu,
for example this is the first dropdown after a click:
this is the second level after click:
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:
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,
MikeJuly 9, 2024 at 10:42 am #1461683Hi 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
KarinJuly 9, 2024 at 2:01 pm #1461695Hi Mike
screenshot- This reply was modified 4 months, 2 weeks ago by leloux.
July 9, 2024 at 2:04 pm #1461697July 9, 2024 at 2:12 pm #1461698Hi 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
KarinJuly 9, 2024 at 5:48 pm #1461709Hi,
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:
Now the multiple dropdowns work:
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,
MikeJuly 10, 2024 at 10:23 am #1461762Hi 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
KarinJuly 10, 2024 at 5:33 pm #1461790Hi,
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,
MikeJuly 11, 2024 at 2:32 pm #1461855Hi 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
KarinJuly 11, 2024 at 5:17 pm #1461861Hi,
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,
MikeJuly 12, 2024 at 11:23 am #1461915Hi 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
KarinJuly 12, 2024 at 2:14 pm #1461924Hi 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!July 12, 2024 at 4:23 pm #1461934Hi,
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 -
AuthorPosts
- The topic ‘2 times drop down menu in left side bar menu’ is closed to new replies.