Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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.jpg

    https://shop-ca.akhurst.com/

    Thank you soooo much!
    Leo

    #1494776

    Hey 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,
    Ismael

    #1494942

    Hi 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.jpg

    I wish I could have ir plcaed like this:
    https://snipboard.io/TnfAvO.jpg

    Thank you so much!
    Leo

    #1494951

    Hi,

    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%;
    }

    fykhHOb.md.png

    Best regards,
    Ismael

    #1494999

    Thank 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.jpg

    The 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.jpg

    Help me ;)
    Leo

    #1495015

    Hi,

    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,
    Ismael

    #1495018

    how 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.

    #1495033

    Hi 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.jpg

    Here’s the Quick CSS added to Enfol settings:
    https://snipboard.io/U74JMR.jpg

    And this is the front end:
    https://snipboard.io/U4YW7R.jpg
    https://snipboard.io/L15tZC.jpg

    What am I missing?
    Cheers, Leo

    #1495034

    Hello 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

    #1495037

    Hi,

    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,
    Ismael

    #1495064

    It worked, Ismael!
    https://snipboard.io/gNse5F.jpg

    But how can I hide it on mobile?

    Thank you sooooooo much!
    Leo

    #1495114

    Hi,

    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,
    Ismael

    #1495143

    It worked!
    Thank you so much, Ismael!

    #1495156

    Hi,

    Great! Please don’t hesitate to open another thread if you have more questions.

    Have a nice day.

    Best regards,
    Ismael

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Search Box in Main Menu while using Mega Menu Plugin’ is closed to new replies.