The $post_id parameter you are talking about tis an option to target a post to load data from.
FYI: the the_sub_field function does NOT contain a $post_id parameter. This is incorrect
If adding this 73 as the $post_id to the has_sub_field function, then this confirms that ACF is not able to find the correct $post_id on its own.
Perhaps the issue is caused by another plugin or code (which contains a WP_Query loop / setup_postdata function) that is modifying the global $post object.
Before your ACF code, can you dump out the global post id like so:
<?php global $post; echo '<pre>'; var_dump($post->ID); echo '</pre>'; die; ?>
What value to you get? Is this the correct ID for the page?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 21, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.