I have created custom fields through the ACF Options page where a user will input their social media profile links. If there is no link, it will not display that icon on the front end. I've done this through creating a group titled 'Social Media' with the various platforms as fields within that group.
I'm pulling my hair out trying to pull those sub-field values into the theme footer. It simply doesn't display anything but when I display a value that isn't nested within a group it shows up.
Footer.php ↴
<?php
if( have_rows('social_media') ):
while( have_rows('social_media') ) : the_row();
?>
<li>
<a href="<?php the_sub_field('instagram'); ?>">
<img src="<?php bloginfo('template_directory'); ?>/assets/img/icons/instagram.png" width="25px" height="25px" alt="Instagram Profile">
</a>
</li>
<?php endwhile; endif; ?>
ACF Group ↴
ACF Options Page ↴
TIA for any help. Much appreciated.