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

Reply To: Filter by YYYY and Search topic in filter

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Filter by YYYY and Search topic in filter Reply To: Filter by YYYY and Search topic in filter

#35593
Ernest MarcinkoErnest Marcinko
Keymaster

Hm, it may need some custom code after all.

Step #1: Change the search button redirection to the same URL as before:

result/?asp_s={phrase}&asp_id=5

Step #2: Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

add_filter('asp_shortcode_search_options', 'asp_change_on_result_page', 10, 1);
function asp_change_on_result_page($args) {
    if ( get_queried_object_id() == 12276 ) {
		$args['fe_sb_action'] = 'ajax_search';
	}

    return $args;
}