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
August 1, 2025 at 2:45 pm
#55120
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.