Last active
February 21, 2018 04:28
-
-
Save roborracle/3aafc6dd301827e77e18 to your computer and use it in GitHub Desktop.
Using Advanced Custom Fields plugin with Font Awesome to create a simple social connections link on a WordPress site.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="social"> | |
<ul class="menu simple rdo-social"> | |
<?php if( get_field('facebook') ): ?> | |
<li><a href="<?php echo the_field('facebook'); ?>"><i class="fa fa-facebook"></i></a></li> | |
<?php endif; ?> | |
<?php if( get_field('twitter') ): ?> | |
<li><a href="<?php echo the_field('twitter'); ?>"><i class="fa fa-twitter"></i></a></li> | |
<?php endif; ?> | |
<?php if( get_field('linkedin') ): ?> | |
<li><a href="<?php echo the_field('linkedin'); ?>"><i class="fa fa-linkedin"></i></a></li> | |
<?php endif; ?> | |
<?php if( get_field('instagram') ): ?> | |
<li><a href="<?php echo the_field('instagram'); ?>"><i class="fa fa-instagram"></i></a></li> | |
<?php endif; ?> | |
<?php if( get_field('github') ): ?> | |
<li><a href="<?php echo the_field('github'); ?>"><i class="fa fa-github"></i></a></li> | |
<?php endif; ?> | |
<?php if( get_field('dribbble') ): ?> | |
<li><a href="<?php echo the_field('dribbble'); ?>"><i class="fa fa-dribbble"></i></a></li> | |
<?php endif; ?> | |
<?php if( get_field('behance') ): ?> | |
<li><a href="<?php echo the_field('behance'); ?>"><i class="fa fa-behance"></i></a></li> | |
<?php endif; ?> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment