• Hi,
    I′ve added a menu box with my Woocommerce search plugin “YITH Woocommerce ajax search”.
    When I check my site on my desktop it shows the correct search but in mobile view it shows the standard WordPress search. I want it to show the Woocommerce search in mobile too but I dont know whats causing this. Thanks for some help!

Viewing 1 replies (of 1 total)
  • Plugin Author joe_bopper

    (@joe_bopper)

    Hi Conny,

    Sorry for my late reply.

    This plugin only adds in the default WordPress search box to menus. I would have thought that to get it to behave like the Yith plugin would likely require a little tinkering. However, as you’re saying that it is working on desktop, perhaps Yith automatically modifies it.

    This plugin doesn’t use any javascript, css, nor inline styles on the frontend, and therefore has no capacity (nor intention) in itself to behave differently from mobile to desktop. Therefore, I think the difference will be coming from Yith and I’d advise asking for support from them.

    The only way I can think of doing a potential quick fix would be to add:

    
    add_filter( 'get_nav_search_box_form', function( $current_form, $item, $depth, $args ){
      ob_start();
      do_shortcode( /* INSERT YITH SEARCH FORM SHORTCODE AS STRING HERE */ );
      $new_form = ob_get_clean();
      return $new_form;
    }, 10, 4 );
    

    to your theme’s functions.php

    Hope this is of help.

    Cheers,
    Joe

Viewing 1 replies (of 1 total)
  • The topic ‘Show Woocommerce search in mobile menu’ is closed to new replies.