Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › How to access search phrase via add_filter › Reply To: How to access search phrase via add_filter
September 14, 2016 at 10:39 am
#10123
Hi Luyen,
To access the search phrase, use the asp_search_phrase_before_cleaning or the asp_search_phrase_after_cleaning filters.
The search data is passed via a POST request. Within this context you should be able to access the raw $_POST data as well:
add_filter('asp_search_phrase_before_cleaning', 'asp_change_search_phrase ', 1,1);
function asp_change_search_phrase ($phrase) {
var_dump($_POST);
return $phrase;
}
Best,Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)



