Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Display results as default › Reply To: Display results as default
May 20, 2020 at 2:54 pm
#27464
Keymaster
Hi,
In that case, this variation will pass the search ID as an argument, so you can check that in the code:
add_filter( 'asp_results', 'asp_custom_link_results', 10, 2 );
function asp_custom_link_results( $results, $search_id ) {
if ( $search_id == 1 ) {
foreach ($results as $k=> &$r) {
$r->link = '#';
}
}
return $results;
}