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

Reply To: Search page issue

#55165
Ernest MarcinkoErnest Marcinko
Keymaster

Not sure, it can be a theme thing. It might be optimal to exlcude them from the results page overall to avoid any conflicts generally:

add_filter(
	'asp_query_args',
	function ( $args ) {
		if ( !$args['_ajax_search']  ) {
			$args['search_type'] = array('cpt');
		}
		return $args;
	}
);

Try adding this code via the Code Snippets (or similar) plugin or 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.