• acidtwin

    (@acidtwin)


    Hi there,

    I’m using the Search on a header above the menu header which slides out. I’ve managed to limit it to show products only however I was wondering if it is possible to swap out the search engine/results page it is using with the WooCommerce Product Search one? As the results in that search come back in a much better style, with buttons to buy etc.

    Thank you in advance,

    Elliot

Viewing 1 replies (of 1 total)
  • Hi @acidtwin,

    Would you please try adding this filter to your site

    add_filter( 'astra_get_search_form', 'astra_search_woocommerce_only' );
    
    function astra_search_woocommerce_only( $search_form ) { 
        $search_form = str_replace( '-1"/>', '-1"/><input type="hidden" name="post_type" value="product"/>', $search_form ); 
        return $search_form;
    }

    I hope it will help. Feel free to reach out to us if you have any further queries.

    Kind regards,
    Herman ??

Viewing 1 replies (of 1 total)
  • The topic ‘Search + WooCommerce Products’ is closed to new replies.