Can anyone suggest the best way to go about adding a ‘mega menu’ to my wordpress navigation without using a plugin?
The content in the mega menu itself does not need to be editable via the CMS HOWEVER does need to be active when the user hovers over a certain li in the main navigation.
I’ve looked on Google but everything is geared towards the plugin route, which I’d liek to avoid.
Thanks
Iâll just point out how you can insert the HTML of your mega dropdown menu, then itâs up to you to style and animate it.
Dig around in
wp-includes/nav-menu-template.php
to find different useful filters for modifying navigation menus created in the admin area. I chose for thewalker_nav_menu_start_el
filter which gets applied to each menu item separately. After the anchor tag has been created you have the possibility to insert more HTML before the closing list item.If you don’t want to use a plugin, you can use the HTML version of JQuery Mega DropDown Menu
In this case you must manage the menu items via code!