<?php if( have_rows('social_media', 'option') ): ?> <ul class="social-media"> <?php while( have_rows('social_media', 'option') ): the_row(); $socialIcon = get_sub_field('icon' , 'option'); $socialLink = get_sub_field('link' , 'option'); ?> <li> <a href="<?php echo $socialLink; ?>"> <img src="<?php echo $socialIcon; ?>"> </a> </li> <?php endwhile; ?> </ul> <?php endif; ?>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter