mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-28 11:22:21 +08:00
5 lines
267 B
Text
5 lines
267 B
Text
add_filter( 'get_search_form', 'astra_get_search_form_callback' );
|
|
function astra_get_search_form_callback( $search_form ) {
|
|
$search_form = str_replace( '-1">', '-1"/><input type="hidden" name="post_type" value="product"/>', $search_form );
|
|
return $search_form;
|
|
}
|