How to add custom social icon from FontAwesome?
To add custom social icon from FontAwesome collection to the theme, please go here and pick your desired icon:
FontAwesome Social Icons
When you pick your icon, please copy its code, you will need it later.
In this tutorial, we will add the Digg icon:
https://fontawesome.com/icons/digg?style=brands
Its code is f1a6
https://i.imgur.com/nbDwxc7.jpg
When you got the code of your desired icon, please make sure you’re using the child theme and put the following code in your child theme’s functions.php file:
function my_presscore_get_social_icons_data($icons) {$icons['digg'] = __('Digg', 'the7mk2');return $icons;}add_filter( 'presscore_get_social_icons_data', 'my_presscore_get_social_icons_data' );
Remember to change the social network name to your desired – please keep the first appearance of the name ($icons[‘digg‘]) in lowercase.
Next, please go to Theme Options -> Advanced -> Custom CSS and put in the following CSS code:
.digg .soc-font-icon:before, .dt-icon-digg:before { content: "f1a6";}.digg .soc-font-icon{ font-family: "Font Awesome 5 Brands" !important; font-weight:900;}
Here you need to change the names of classes (digg) to the name of the network you’ve used in the code before ($icons[‘digg‘]), and the code of the icon (content: “f1a6“;), to the code of the icon you’ve picked – remember to keep the slash “” before the code.
After that, please go to Theme Options -> Top Bar & Header -> Microwidgets and set the new icon in the Social Icons widget.