K
K
Knowledge Base - Ajax Search Pro for WordPress
Buy Ajax Search Pro!
Documentation
Get Support
Search
⌃K
Links
Knowledge Base
Safe Coding Guideline
Hooks
Filters
Query & Output
asp_query_args
asp_query_{type}
asp_cached_content
asp_pre_get_front_filters
asp_before_ajax_output
asp_shortcode_output
asp_print_search_query
Keyword Suggestions
Search Results
CSS & JS
Index Table Related
Templating
Constants
Frontend Filters
Taxonomy Filters
Frontend filters API
Tips & Miscellaneous
Tutorials
Post Types
Taxonomy Terms
WooCommerce
Compatibility
Other
Other
ASP_Query
REST API
Building a custom REST API
Javascript API
Javascript Hooks
Theme Functions
Powered By
GitBook
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
add_filter
(
"asp_print_search_query"
,
"asp_change_print_search_query"
,
10
,
2
);
function
asp_change_print_search_query
(
$query
,
$search_id
)
{
// Do whatever with the query
return
$query
;
}
Previous
asp_shortcode_output
Next
Keyword Suggestions
Last modified
1yr ago