K
K
Knowledge Base - Ajax Search Pro for WordPress
Buy Ajax Search Pro!
Documentation
Get Support
Search…
Knowledge Base
Safe Coding Guideline
Hooks
Filters
Templating
Constants
Frontend Filters
Taxonomy Filters
Frontend filters API
Tips & Miscellaneous
Tutorials
Post Types
Taxonomy Terms
WooCommerce
Compatibility
Other
Restrict results from the current author archive page
Presetting search options via a custom URL
Replace search keywords (whole words)
Replace or remove characters from search phrase
How to change the results URL to something else?
Numbering the results
How to use the search without the live ajax feature, as a regular search?
Empty search input field on the search results page
Other
ASP_Query
Building a custom REST API
Javascript API
Javascript Hooks
Changelog
Powered By
GitBook
Empty search input field on the search results page
Make the search query disappear from the input field on the search results page after redirection
What is this, and where do I put this custom code?
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
// Return empty string
5
return
''
;
6
}
Copied!
Previous
How to use the search without the live ajax feature, as a regular search?
Next - Other
ASP_Query
Last modified
7mo ago
Copy link