How to get ACF field on the different pages
Retrieving ACF fields outside the loop ACF’s get_field() function works inside the WordPress loop without extra arguments, but when you need to read a field value from functions.php, an AJAX handler, or a template for a different post, you have to pass the post ID explicitly.