Home › Forums › General Issues › Repeater field data not showing on site › Reply To: Repeater field data not showing on site
Hi @rammelasen
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?
Thanks
E
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!
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.