asp_print_search_query
Allows changing the value (search query) before printed to the search input field on the search results page

Parameters

  • $query(string) - The search query string
  • $id (int) - Search instance ID

Usage

1
add_filter("asp_print_search_query", "asp_change_print_search_query", 10, 2);
2
3
function asp_change_print_search_query($query, $search_id) {
4
// Do whatever with the query
5
return $query;
6
}
Copied!
Last modified 3mo ago
Copy link