Please keep in mind that the code example in the documentation is supposed to be used in the front end template files, not functions.php file. Like What Edd said if you want to add it in functions.php file, you need to put it inside a function. Don’t forget to pass the object ID as the second parameter of the
have_rows() function if you execute it in functions.php like this:
while ( have_rows('repeater_field_name', 99) )
Where ’99’ is the object ID (post, page, etc.). Also, could you please set WP_DEBUG to true to see any error messages on the page? Please take a look at this page to learn how to set it: https://codex.wordpress.org/Debugging_in_WordPress.
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!
© 2023 Advanced Custom Fields.