This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Search box in main menu problem

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search box in main menu problem

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #49201
    YansYans
    Participant

    Hi,

    I created a search instance for all content (posts, pages, events, projects, files) and I want to have a search box for it in the main menu.

    I followed the documentation for adding a search box to the main menu but instead of a search box there is the text “Ajax Search Pro”. Nothing happens when I click this menu item.

    I am using the “Max Mega Menu” plugin (https://wordpress.org/plugins/megamenu/) for the main menu.

    How can I add the search box for this instance to the main menu?
    Also, is it possible to have the search box represented by an icon and search box appear when clicking the icon?

    Thanks!

    #49202
    YansYans
    Participant

    When I try to add the search box via the legacy method of using the shortcode, it adds the search box, settings and results all together.

    I use this shortcode:

    [wd_asp elements='search' id=4]

    #49203
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    It could be because of the combination with the custom menu plugin, it may convert the output in some way and that may cause a bit of incompatibility.

    In this case you should stick with the legacy shortcode method instead. If the menu supports custom HTML box, Gutenberg block or a shortcode box as a menu item, then definitely use that instead.

    #49204
    YansYans
    Participant

    Thanks.

    I used the shortcode [wd_asp elements='search' id=4] as a menu item and also as a separate Divi text module, but in both cases it displayed the search box + settings block + results block.

    How can I use a shortcode just for the search box, and how can it open in the page I use for displaying the settings and results?

    Best,

    Yan

    #49213
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Yan,

    For that, I recommend creating a different search shortcode – on the first one you can set the settings and results to be not visible and use that one on the menu, and use the simple shortcode for that: [wd_asp id=5]

    You can even duplicate the existing shortcode so you don’t have to start from scratch.

    #49245
    YansYans
    Participant

    Hi Ernest,

    Thank you for the suggestion to use a duplicated search instance, I used it for the main menu and it is redirecting the search query to the original search page.

    I managed to get the shortcode to work in the main menu by using the legacy method (with a custom link).

    This ticket can be closed.

    Best,

    Yan

    #49247
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Search box in main menu problem’ is closed to new replies.