I’m having a problem with the repeater field in Acf Pro. Basically, it works fine in the admin (it saves the data), but nothing shows up in the front. It's driving me mad because I'm using the exact same snippet in another website, same WP version, same ACF version, and it's working, but with the website I'm currently developing I'm having this problem both locally and in production.
The name of the repeater field is logo_grid It has an image field inside (URL type) named logo_grid_img
This is my code:
<?php if( have_rows('logo_grid_logos') ): ?> <?php while( have_rows('logo_grid_logos') ): the_row(); ?> <img src="<?php echo get_sub_field('logo_grid_img'); ?>"> <?php endwhile; ?> <?php endif; ?>
I tried var_dump and it just returns null.
<?php $my_var_dump = get_field('logo_grid_logos'); ?> <?php var_dump($my_var_dump); ?>
I’m quite desperate. Does anyone have any clues?