-
AuthorPosts
-
January 19, 2021 at 4:00 pm #1273763
Hi, I just tried to add a custom social icon in the header.
As seen in your documentation I added this code in the functions.php:
// Register new icon as a theme icon function avia_add_custom_icon($icons) { $icons['phone'] = array( 'font' =>'fontello', 'icon' => 'ue854'); return $icons; } add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); // Add new icon as an option for social icons function avia_add_custom_social_icon($icons) { $icons['Phone'] = 'phone'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
Usually “ue854” should be a fontello phone icon, but there is a pencil showing instead. Whatever icon code I add, it’s still the pencil.
What goes wrong?
Best regards
January 20, 2021 at 1:54 pm #1274049Hey Dirk,
Please use the code as following
// Register new icon as a theme icon function avia_add_custom_icon($icons) { $icons['phone'] = array( 'font' =>'entypo-fontello', 'icon' => 'ue854'); return $icons; } add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); // Add new icon as an option for social icons function avia_add_custom_social_icon($icons) { $icons['Phone'] = 'phone'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
Font should be entypo-fontello instead of fontello :)
Best regards,
YigitJanuary 21, 2021 at 12:00 pm #1274332Hey Yigit,
thanks a lot. It works like a charm now ;)
You should change that in the documentation as well.Best regards,
Dirk- This reply was modified 3 years, 9 months ago by diggital.
January 21, 2021 at 12:29 pm #1274349Hey Dirk,
You are welcome! :)
We actually have following line in docs:
Note: you may need to change “fontello” to the name of the imported font (you can check that in Enfold > Import/Export > Iconfont Manager
Imported fonts may have different names so it is always better to check Iconfont Manager for font names. For default icons, it is “entypo-fontello” – https://imgur.com/a/MxrNMEu
I will add a note for default icons, if you have any other suggestions, please let us know :)
Best regards,
YigitJanuary 22, 2021 at 11:40 am #1274657Hey Yigit,
that’s what I meant.
Thanks for your support!Best regards,
DirkJanuary 22, 2021 at 11:58 am #1274659 -
AuthorPosts
- The topic ‘Customize Social Icons in Header’ is closed to new replies.