Social links for WordPress using bootstrap and fontawesome.

<div class="social-links"> <div class="col-sm-3" style="text-align: center;"> <a class="fa fa-linkedin-square" aria-hidden="true" href="<?php the_permalink() ?>&title=<?php the_title(); ?>&summary=&source=<?php bloginfo('name'); ?>" target="_new"></a> </div> <div class="col-sm-3" style="text-align: center;"><a class="fa fa-facebook-official" aria-hidden="true" target="_blank" href="<?php the_permalink();?>&t=<?php the_title(); ?>"></a> </div> <div class="col-sm-3" style="text-align: center;"><a class="fa fa-twitter-square" aria-hidden="true" href="<?php echo urlencode(the_title()); ?>&url=<?php echo urlencode(the_permalink()); ?>&via=twitter&related=<?php echo urlencode("coderplus:Wordpress Tips, jQuery and more"); ?>" title="Share on Twitter" rel="nofollow" target="_blank"></a> </div> <div class="col-sm-3" style="text-align: center;"> <a class="fa fa-google-plus-square" aria-hidden="true" href="<?php the_permalink();?>" target="blank"></a> </div> </div>
If you want to use this for something other than WordPress you can swap out the php for whatever else you want.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.