K
K
Knowledge Base - Ajax Search Pro for WordPress
Buy Ajax Search Pro!DocumentationGet Support
Search…
⌃K
Links
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
REST API
Building a custom REST API
Javascript API
Javascript Hooks
Theme Functions
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?​
add_filter("asp_print_search_query", "asp_change_print_search_query", 10, 2);
​
function asp_change_print_search_query($query, $search_id) {
// Return empty string
return '';
}
​
Previous
How to use the search without the live ajax feature, as a regular search?
Next - Other
ASP_Query
Last modified 1yr ago
Copy link