Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

IfNotEmpty

IfNotEmpty

<?php 
    $linkedin = get_option_tree('linkedin');
    if (!empty($linkedin)) {
?>
       <a href="<?php echo get_option_tree('linkedin');?>" target="_blank" alt="linkedin"><img src="<?php bloginfo('template_directory');?>/images/social/32-linkedin.png" class="social-icon"></a>
<?php
    } else { 
        echo "";
    }
?>