How to Add Social Media Icons in WordPress: Best Practices and Useful Plugins

How to Add Social Media Icons in WordPress: Best Practices and Useful Plugins

If you have other digital presence beside your website, why not show it to your visitors? In this article. we will show you how to add social media icons to WordPress.

Showing your social media to your visitors allows them to follow you – and the best way to do it is by having social media icons on your website. Since it doesn’t take much of your space, you can put it anywhere without disturbing your overall layout.

Steps to Add Social Media Icons to WordPress

There are two ways you can do this: adding the social icons by hand or making use of third-party icon WordPress plugins.

If you decide to use social media plugins, here is a list of our favorite ones:

Using a WordPress plugin is a great choice for beginners as it doesn’t require much technical skill on your part. However, most of them don’t include less popular social networks. If you don’t find an option to add your particular social profile on the plugin, you need to do it manually.

Although you will encounter some coding, we assure you that adding social media icons to WordPress isn’t complicated at all. Here is how you can easily add social media icons to your WordPress site.

1. Choose a Social Media Icon

Finding an icon you need isn’t hard at all. A quick Google search will provide you with a vast number of choices.

Pro Tip

Note that you can’t just use icons that belong to others. It may lead you to violate copyright laws.

A workaround through this is by filtering Google Image Search based on usage rights. Go to Images -> Tools -> Usage rights -> Labeled for reuse.

Google Search Image filtered with labeled for reuse usage rights.

Now, Google will only show results you can use freely. You can look for each icon that you like, or you could just download all-in-one icon packs.

A few sites such as Iconfinder provide you with free icon packs with many varieties for you to use.

Once you find the icons, download them and upload them to the WordPress media library. Go to Media -> Add New, and put the icons there.

It’s best if you use the multi-uploader so that you can upload all the icons at once.

2. Add Widget and Configure HTML

Now, you have to add the WordPress widget containing the social media icons on your site.

On your WordPress dashboard, navigate to Customizer -> Widgets. Then, add “Custom HTML” by dragging it to your header, sidebar, or footer section.

Fill the title with “Social Media” for example, and copy-paste the following code.

<div><a href=""><img style="margin:5px" src="[path to your icon]" width="30" height="30" alt="Instagram"></a><a href=""><img style="margin:5px" src="[path to your icon]" width="30" height="30" alt="Facebook"></a><a href="" ><img style="margin:5px" src="[path to your icon]" width="30" height="30" alt="YouTube"></a></div>

Pro Tip

Notice the word username and the bracket spread out along the code? You need to change them to your social media profile names and the direct image URL to your icon.

Instagram logo WordPress media library details

Go to Media -> Library and click on an icon that you uploaded. Take a look at the URL column. That’s the direct link you need to use to replace the bracket shown in the code above.

Your final code should look somewhere like this.

Inputting the codes for showing social media icons as Custom HTML

Make sure that the direct URL of your image ends with the file extension such as .png or .jpg, otherwise it means that you put the wrong code and the icons won’t show up.

After you’re done replacing the parts of your code, click Save. Go to your site to check out your new widget.

Social media widget example on a WordPress site

Now that you successfully added social media buttons on your site, you can repeat the process for each more button that you want to add. It’s simple and doesn’t require much of your time, yet gives you a boost in increasing your social media and site’s engagement.


Adding social media icons to your website is a great way to increase your following and overall brand’s visibility.

Now you know how to add social media icons to WordPress.

Hopefully, this article was helpful. Good luck!

Was this tutorial helpful?

The author

Klara R.

Klara is a Digital Content Writer. She enjoys creating eCommerce sites and is always looking to expand her IT knowledge. During her free time, Klara likes to travel and experience different cultures.