Adding extra social icons to DIVI
One of the features of the DIVI Theme Options panel is the ability to add social links for Facebook, Twitter, Google+ and RSS. Unfortunately that is where the options end.
Thankfully, there is a way to work around this. It does require a little bit of coding, but I’ve laid out the steps for you to follow. Even if you’re not tech-savvy, you’ll be able to do it, I promise!
With my code snippets, you’ll be able to add icons for Instagram, Pinterest, LinkedIn, Tumblr, Skype, YouTube and Vimeo.
What do you need?
- A child theme activated on your site
- Access to the folders on your web site, either via FTP or the WP File Manager plugin.
How do you do it?
- Navigate to your child theme wp-content/themes/
- Create a folder in your child theme called includes. Be careful to keep it all in lowercase.
- Navigate to wp-content/themes/divi/includes/
- Download a copy of the file social_icons.php
- Upload the social_icons.php file into your new child theme, includes folder.
- Open/edit the social_icons.php file
- Copy the relevant snippet from the code below. Paste it at the bottom of the page, just before the </ul> tag.
Add as many as you need.
- Replace the URL within the code “http://www.yoururl.com” with your own social media URL.
Make sure you have quotation marks at the start and end.
- Save your file.
- Refresh your page, you’ve done it!
Make sure you place the code at the end of the page, before the </ul> tag.
It’s really important that the </ul> tag is last. It tells the browser that this is the end of the list.