This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Statistics issue when user presses 'return'

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Statistics issue when user presses 'return' Reply To: Statistics issue when user presses 'return'

#35609
Ernest MarcinkoErnest Marcinko
Keymaster

I’m afraid yes, but maybe with a custom code there is a way to trigger it whenever the search results page is displayed.

add_action('posts_results', 'asp_trigger_search_stat');
function asp_trigger_search_stat() {
	if ( is_search() && isset($_GET['s']) && $_GET['s'] != '' ) {
		asp_statistics::addKeyword(-1, $_GET['s']);
	}
}