-
AuthorPosts
-
February 5, 2026 at 9:11 pm #1494770
Hello,
I need some help …
How can I add a search box as a menu item while using a Mega Menu plugin/structure?
I wish I could do something like this:
https://snipboard.io/TnfAvO.jpgThank you soooo much!
LeoFebruary 6, 2026 at 5:14 am #1494776Hey Akhurst,
Thank you for the inquiry.
You can insert a widget area in the header and add a Search widget to it. Please check this documentation for more info: https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area
Best regards,
IsmaelFebruary 11, 2026 at 12:55 am #1494942Hi Ismael!
Thanks for your help on this one…So, I tried my best here, but things are awkward ;)
I added the code using my WP Code plugin, but I dont know how to adjust the search box properly.
https://shop-ca.akhurst.com/
https://snipboard.io/pYh6nR.jpg
https://snipboard.io/O0xzgR.jpgI wish I could have ir plcaed like this:
https://snipboard.io/TnfAvO.jpgThank you so much!
LeoFebruary 11, 2026 at 5:53 am #1494951Hi,
Thank you for the update.
You can add this css code to adjust the position of the search widget. You may need to fine-tune it for different screen sizes using css media queries.
#top .widget_product_search.widget { position: absolute; min-width: 312px; left: 50%; transform: translateX(-80%); z-index: 100; top: 30%; }Best regards,
IsmaelFebruary 11, 2026 at 6:55 pm #1494999Thank you!
It worked!
But something crazy happened at the same time after I added that CSS to the wusicj CSS inside Enfold settings.
The search feature that worked fine in the sidebar is now broken.
https://snipboard.io/JywQFg.jpg
https://snipboard.io/YQ8Kqy.jpgThe sidebar search feature works fine when I delete the CSS, but the menu-top search widget goes back to the top like yesterday…
https://snipboard.io/HATeMP.jpgHelp me ;)
LeoFebruary 12, 2026 at 6:38 am #1495015Hi,
Thank you for the screenshots.
The css code for the widget should not have affected the sidebar. Please make sure there is no invalid css and that you didn’t accidentally break or modify the existing code when adding the recent changes. Let us know the result.
Best regards,
IsmaelFebruary 12, 2026 at 7:40 am #1495018how did you insert the search box to the mega-menu drop-downs?
Why am I asking this? It might be possible to limit the search to only the relevant menu item. So when Parts is expanded, the search would only be performed for Parts.btw. I actually think that placement is better because it doesn’t cause you any problems with responsiveness.
Edit: See—it seems that tools are a subcategory of parts. Then there would be two possibilities. If you search in the parts dropdown menu, tools will also be included—or not—we exclude them from the search, and only when I search for tools in the dropdown menu of tools they will be found there.
February 12, 2026 at 6:06 pm #1495033Hi Ismael!
I think I’m doing everything correctly. I guess …
https://shop-ca.akhurst.com/Here’s the Code Snippet that I’m using from one of your posts:
https://snipboard.io/bRV0Xn.jpgHere’s the Quick CSS added to Enfol settings:
https://snipboard.io/U74JMR.jpgAnd this is the front end:
https://snipboard.io/U4YW7R.jpg
https://snipboard.io/L15tZC.jpgWhat am I missing?
Cheers, LeoFebruary 12, 2026 at 6:10 pm #1495034Hello Guenni007,
I’m using a plugin for the mega menu structure.
I just need to add the feature. Super simple and customizable.https://snipboard.io/gUbCeu.jpg
Cheers, Leo
February 13, 2026 at 4:57 am #1495037Hi,
Sorry about that. It was indeed the css modification that caused the search field in the sidebar to be repositioned. Please edit the previously suggested css code and replace it with:
#top #header_main .widget_product_search.widget { position: absolute; min-width: 312px; left: 50%; transform: translateX(-80%); z-index: 100; top: 30%; }Let us know how it goes.
Best regards,
IsmaelFebruary 13, 2026 at 6:37 pm #1495064It worked, Ismael!
https://snipboard.io/gNse5F.jpgBut how can I hide it on mobile?
Thank you sooooooo much!
LeoFebruary 16, 2026 at 7:43 am #1495114Hi,
Thank you for the update.
To hide the header search widget on mobile, add this css code at the bottom of the previous modifications:
@media only screen and (max-width: 767px) { #top #header_main .widget_product_search.widget { display: none; } }Best regards,
IsmaelFebruary 16, 2026 at 8:49 pm #1495143It worked!
Thank you so much, Ismael!February 17, 2026 at 6:24 am #1495156 -
AuthorPosts
- The topic ‘Search Box in Main Menu while using Mega Menu Plugin’ is closed to new replies.

