Hi. We have a code that is adding prefixes on all post titles with the help of ACF. The custom fields shows on single post (because it has post title) but in the homepage that displays new latest posts, it doesn’t show up even though the post have titles.
Post https://prnt.sc/STe2SrAcFP4w
Homepage (Where latest posts loops) https://prnt.sc/HjlDejUhqsmx
add_action ('the_title' , 'test', 10, 2);
function test($title, $id) {
$number= get_field('number');
return 'post' === get_post_type($id) ? $number. 'PREFIX ADDED' . $title : $title;
}