Skip to content

Instantly share code, notes, and snippets.

@robincornett
Created September 1, 2016 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robincornett/ed511633189b90ec5734532bd67cc7dc to your computer and use it in GitHub Desktop.
Save robincornett/ed511633189b90ec5734532bd67cc7dc to your computer and use it in GitHub Desktop.
Replace SuperSide Me's default search input with the WooCommerce search.
<?php
add_filter( 'supersideme_search_output', 'prefix_use_woo_search' );
/**
* Replace the default SuperSide Me search form with the WooCommerce product search.
* @param $search_form string
*
* @return string
*/
function prefix_use_woo_search( $search_form ) {
if ( function_exists( 'get_product_search_form' ) ) {
$search_form = '<div class="search-me">';
$search_form .= get_product_search_form( false );
$search_form .= '</div>';
}
return $search_form;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment