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:30 pm
#27463
Participant
I was using this,`but it change all the result pages of the search in the site, as i have 2 different ones then it change for 2 but i need that this change apply in a just one search
add_filter( ‘asp_results’, ‘asp_custom_link_results’, 1, 1 );
function asp_custom_link_results( $results ) {
// Parse through each result item
foreach ($results as $k=>$v) {
/**
* In this context the
* $results[$k]->link
* variable holds the result link. Make modifications to that variable.
*/
$results[$k]->link = ‘#’;
}
return $results;
}