Home › Forums › Bug Reports › Multiple fields and multiple pages don't work › Reply To: Multiple fields and multiple pages don't work
Hi @buckybee
Your code looks fine, however you are missing the WP loop which could be causing the issue you have posted.
Without this loop, it is possible that the global $post object is not instantiated correctly.
The WP loop is documented on the codex, and used in the default theme included in your WP install. I would check it out and make sure yo use it.
To test what ACF data is available, try using the get_fields
function.
Try also passing in the $post->ID value as the first parameter like so:
get_fields( $post->ID )
This function will return all fields in an array. So you will need to debug the data by dumping it like so:
<?php echo '<pre>';
print_r( get_fields( $post->ID ) );
echo '</pre>';
die; ?>
You mentioned that many other people are having this exact issue? Could you be so kind to link to these other threads, as I am not aware of a widespread issue regarding values not being returned.
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.