It looks like it should be working. You need to test to see if this $post_id = get_the_ID(); is actually the current post ID. Right after that add echo '<br>',$post_id,'<br>'; and make sure that you’re trying to get the values from the correct post.
Welcome
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.