Archived topic
CSS to eliminate dropdown option from top main navigation?
5 replies · Started by Gidget Hall on September 3, 2021
Hi support friends. I apologize in advance, I know this is a question that has been answered, but I cannot find it to save my life in search.
I found a support topic last year with CSS to add to remove the dropdown feature from the top navigation. I have somehow obliterated that change during major overhaul work in my stage environment and cannot find that thread again nor where I saved the CSS for future use for the life of me.
The goal is to only show my main pages in the top nav (e.g. "Services") with no drop-down options to click directly to secondary pages nested under those (e.g. Case Studies). I have links to those secondary pages from the main page and want to lead visitors on that path vs. going straight to the details before reading the main Services page.
Example: Main navigation (top) = Home | Services | About | Contact
... Under Services, secondary pages = Case Studies, White Papers, Landing Pages, Email Sequences
I don't want any dropdown arrows on that top nav at all, I want them to navigate to those pages from the main Service page once they are there.
Thank you so much. I promise to save this properly this time!
Hi Gidget,
Not sure I fully understand your question, but sounds like you just Do Not need any submenu for your primary navigation:
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#creating-a%C2%A0drop-down-menu
Try remove the submenus.
Let me know if you need further assistance :)
Thanks, Ying. I don't have "menus" as my nav is quite simple. Only four main pages. I have everything currently set up in the customizer. I wish I could find that original post as all it took was copy/pasting and voila, no more drop-down arrows on that main nav.
I'm still not sure what you mean...
Any chance you can link us to the site in question?
You can use the private information field.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
It's no problem. I gave up trying to find how I'd made it work previously without creating actual menus vs. the default where secondary pages nested under parent pages show as dropdowns and just created menus instead. I'm using Elementor as my page builder, so putting the secondary pages I want in my footer was easy and I just have direct links on main pages to the ones I don't want to show either in the primary navigation or in the footer.
Thanks for your reply, I think I'm good now.
OK, don't hesitate to let us know if you need help :)
Just link us to your site, we'd be happy to have a look for you!