Hi!
I assume you had a custom code in place to change the URLs, but I couldn’t find it anywhere.
I have added the Code Snippets plugin and added the following custom code to fetch the news_url custom field:
add_filter( 'asp_results', function ( $results, $search_id, $is_ajax, $args ) {
// Change this variable to whatever meta key you are using
$meta_key = 'news_url';
// --- DO NOT CHANGE ANYTHING BELOW ---
foreach ($results as $k=>$r) {
if ( function_exists('get_field') ) {
$new_url = get_field( $meta_key, $r->id, true ); // ACF support
} else {
$new_url = get_post_meta( $r->id, $meta_key, true );
}
// Change only, if the meta is specified
if ( !empty($new_url) ) {
// Ajax results link
if ( isset($r->link) ) {
$r->link = $new_url;
}
}
}
return $results;
}, 10, 4 );