Archived topic
Open a drop-down menu when a user clicks on a header menu nav option
5 replies · Started by Edward on February 23, 2021
Hi, how can I make a dropdown menu on my website https://newwebsiteexample.com work like the one on this website https://cxl.com where the dropdown happens when a user clicks on a menu option?
Also some of the menu options are hyperlinks which open in a new tab, so how can I do this too please?
Ideally I need the first three to work as drop-downs on click and the others to hyperlink to a new tab.
I would appreciate your help with this and can disable my caching plugins when needed.
Hi there,
this article explains how to create sub menus:
And further down that page how to set a link to open in a new tab:
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#opening-in-a-new-window-tab
Thanks David, but when I create a sub menu how do I disable the dropdown when a user hovers over it and show it when they click on it?
Also when I click on the menu item now it takes me to the first option in the dropdown list. How do I disable this?
You can set the Navigation Dropdown method in Customizer > Layout > Primary Navigation.
https://docs.generatepress.com/article/primary-navigation-layout-overview/
For the first Menu Item - remove the URL. This will have no link :)
Will do thanks. You can close the ticket.
Glad to hear that