Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › CPT Title search returns no results › Reply To: CPT Title search returns no results
April 14, 2022 at 2:27 pm
#37532
Keymaster
Okay, that should be still possible:
add_filter('asp_results', 'custom_asp_redirect_url', 10, 2);
function custom_asp_redirect_url($results, $search_id) {
$apply_on_id = 1;
if ( $apply_on_id == $search_id ) {
foreach ( $results as $k => &$r ) {
$r->link = get_site_url() . '/agent-portal/management/agent-profile-update/?agent_ID=' . $r->id;
}
}
return $results;
}
Change the $apply_on_id variable to the search ID you want the code to apply on, and it should be fine.