I am using the following code in my child theme's functions.php file to replace the_author() value (dc:creator node) with the value of an Advanced Custom Fields text field named custom_byline. It seemed to be working like a charm, but there are some posts which inexplicably don't update ... do you see issues with the code I didn't catch?
if(is_feed()) {
$post_id = get_the_ID();
if (get_field('custom_byline') != '') {
$creator = get_post_meta($post_id, 'custom_byline', true);
}
}
return $creator;
}
add_filter('the_author','custom_byline_in_feed');