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

Reply To: Dummy/Empty Item generated in results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Dummy/Empty Item generated in results Reply To: Dummy/Empty Item generated in results

#55120
Ernest MarcinkoErnest Marcinko
Keymaster

Okay, I think it’s doable with a small custom code snippet.

Use this code via the Code Snippets 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.

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

If you need help with it just let me know.