Skip to content

Instantly share code, notes, and snippets.

@roborracle

roborracle/template.php

Last active Feb 21, 2018
Embed
What would you like to do?
Using Advanced Custom Fields plugin with Font Awesome to create a simple social connections link on a WordPress site.
<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
You can’t perform that action at this time.