• Resolved REPLcook

    (@replcook)


    We were tidying up our site, and shrinking the height of the menu bar. We noticed that there was an additional search form behind it. After investigation we found that turning off the Responsive Menu plugin removed that additional search bar. Turning off Search in the plugin had no effect either.

    Is there a setting we’re missing?

    Thanks

    Dylan

Viewing 7 replies - 1 through 7 (of 7 total)
  • Peter Featherstone

    (@peterfeatherstone-1)

    Hi Dylan,

    Please provide a URL to the site in question with the additional search form so I can take a look for you and advise.

    Peter

    Thread Starter REPLcook

    (@replcook)

    Hi Peter,

    No worries:

    https://www.replgroup.com

    When you inspect you’ll see the search form in question is at the top of the body. For whatever reason, all Analytics etc gets pushed into the body.

    If I deactivate, everything goes back to its rightful place. Its a strange one. Even checked our searchform.php in case that was causing errors.

    Thanks,

    Dyl

    Peter Featherstone

    (@peterfeatherstone-1)

    Hey there,

    That form is not from my plugin so I am not sure where it is coming from. Also, as you say your site code is all looks messed up (there is meta data etc. in the body and things are not where they should be).

    I can only guess that you are using the Shortcode and then inserting this in the wrong place, can you please let me know if you have the shortcode turned on and if so where/how you are echoing this is in your template files?

    Peter

    Thread Starter REPLcook

    (@replcook)

    Hey Peter,

    First, thank you so much for helping with this issue.

    So I think the conflict may arise here, in the functions.php file:

    add_filter(‘wp_nav_menu_items’,’add_search_box_to_menu’, 10, 2);
    function add_search_box_to_menu( $items, $args ) {
    if( $args->theme_location == ‘main-menu’ )
    return $items.get_search_form();

    return $items;
    }

    Thats how we add the Search to the desktop menu. When I comment this out, and have the plugin activated, everything works ok.

    Thanks,

    Dylan

    Peter Featherstone

    (@peterfeatherstone-1)

    Hey Dylan,

    That looks exactly like your issue. It was probably a false negative with my menu because my menu uses wp_nav_menu which would of then called your filter.

    Glad we found the issue together 🙂

    Peter

    Thread Starter REPLcook

    (@replcook)

    Hey Peter!

    Gone an alternative route for the search on desktop.
    Thanks again for all your help.

    Dyl

    Peter Featherstone

    (@peterfeatherstone-1)

    Hey Dyl,

    Great news and thanks for letting me know.

    Have a great day

    Peter

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Plugin creates an additional search bar’ is closed to new replies.