Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search page issue › Reply To: Search page issue
August 6, 2025 at 9:13 am
#55165
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.