Skip to content

Instantly share code, notes, and snippets.

@RiaanKnoetze
Created August 24, 2016 08:17
Show Gist options
  • Save RiaanKnoetze/a5743603a4e9bd10ee76b9746d36f851 to your computer and use it in GitHub Desktop.
Save RiaanKnoetze/a5743603a4e9bd10ee76b9746d36f851 to your computer and use it in GitHub Desktop.
Show search section from "Product Search" extension in Storefront header
// Hide native search bar
remove_action( 'storefront_header', 'storefront_product_search', 40 );
// Show "Product Search" search bar
add_action( 'storefront_header', 'storefront_predictive_search', 40 );
function storefront_predictive_search() {
echo do_shortcode('[woocommerce_product_search]');
}
.product-search.floating {
width: 21.7391304348%;
float: right;
margin-right: 0;
clear: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment