Skip to content

Commit e2c1694

Browse files
social links example up
1 parent c641795 commit e2c1694

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

acf_pro_snippets.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@
3737
<ul class="social-links">
3838
<?php while ( have_rows( 'social_links', 'option' ) ) : the_row(); ?>
3939
<?php
40-
$link_class = get_sub_field( 'link_class' );
40+
$icon_class = get_sub_field( 'icon_class' );
4141
$link = get_sub_field( 'link' );
4242
?>
43-
<?php if ( $link_class && $link ) : ?>
44-
<li><a href="<?php echo esc_url( $link ); ?>" class="icon-<?php echo sanitize_html_class( $link_class ); ?>" target="_blank"></a></li>
43+
<?php if ( $icon_class && $link ) : ?>
44+
<li>
45+
<a href="<?php echo esc_url( $link ); ?>" target="_blank">
46+
<span class="icon <?php echo sanitize_html_class( $icon_class ); ?>"></span>
47+
</a>
48+
</li>
4549
<?php endif; ?>
4650
<?php endwhile; ?>
4751
</ul>

0 commit comments

Comments
 (0)