Skip to content

Instantly share code, notes, and snippets.

View theSalafee's full-sized avatar
🥋
Becoming a Ninja

Naasir Bush theSalafee

🥋
Becoming a Ninja
  • Sakeenah Studios
  • Spokane, Washington
  • 18:19 (UTC -08:00)
View GitHub Profile
@morgyface
morgyface / social.php
Last active April 11, 2024 22:37
WordPress | ACF | Social Media Links using Advanced Custom Fields and FontAwesome
<?php
if( have_rows('social_media', 'option') ):
echo '<div class="container social my-4">';
echo '<p class="follow mb-0 align-middle">Follow us</p>';
echo '<ul class="nav align-middle">';
while ( have_rows('social_media', 'option') ) : the_row();
$socialchannel = get_sub_field('social_channel', 'option');
$socialurl = get_sub_field('social_url', 'option');
echo '<li class="nav-item">';
echo '<a class="nav-link" rel="nofollow noopener noreferrer" href="' . $socialurl . '" target="_blank">';