This function will enable you to insert social links into your templates very easily!

You can use this simple function to add links you your social networking pages. It features clean Font Awesome icons. I’ve include a few of the most common networks, but its esy to add more.

The Code

Set Up

Just change the URL’s to those of you own social networking pages in the following code. The social icons are Font Awesome icons so be sure to add this function too.

You should be able to work out how to add other networks. If not, leave a comment and myself or someone else might be able to help.


Say you wanted your icons placed in the header of your site, you would add the following code to your header.php.

You can see it in action here on this site (see header and footer). Where exactly to add this in your header.php depends on your theme.

You may need to experiment for best effect and do some css styling. You can also change the size of the icons. Possible values that you can pass in the function call –  ‘lg’, ‘2x’, ‘3x’, ‘4x’, ‘5x’.

Note: You’re using a child theme right? Never change the templates in a parent theme!