Tagged: add, flaticon, fontello, fontello icon, icon, replace, social, social icon
-
AuthorPosts
-
May 10, 2017 at 7:15 pm #791289
Hi enfold team,
I’m sorry to ask but I cannot find the solution by myself.
I try to replace the mail and instagram icon in the header.
After adding the icons and put that code in the function.php of the child theme :
// Changer les icones socials———————–*/
function avia_add_custom_icon($icons) {
$icons[‘icon-mail’] = array( ‘font’ =>’fontello’, ‘icon’ => ‘ue800’);
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[‘social_icon’] = ‘icon-mail’;
return $icons;
}
add_filter(‘avf_social_icons_options’,’avia_add_custom_social_icon’, 10, 1);function avia_add_custom_icon($icons) {
$icons[‘flaticon-instagram-social-network-logo-of-photo-camera:before’] = array( ‘font’ =>’flaticon’, ‘icon’ => ‘uf100’);
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[‘social_icon’] = ‘flaticon-instagram-social-network-logo-of-photo-camera:before’;
return $icons;
}
add_filter(‘avf_social_icons_options’,’avia_add_custom_social_icon’, 10, 1);What do I do wrong ?
Thanks in advance,
Best regards,
ClémentMay 11, 2017 at 6:16 am #791483Hey Blue_Bear,
Did you follow this article? -> http://kriesi.at/documentation/enfold/custom-social-icons/
If yes, may you provide us your WP and FTP credentials?
Best regards,
John TorvikMay 11, 2017 at 11:16 am #791588Hi,
I do follow the indications of the link above. But I do not understand eerything so maybe I’ve made a mistake somewhere…
I give you credential in the private content below.
Thanks !
ClémentMay 11, 2017 at 12:16 pm #791600Hi Clément,
Your website isn’t loading for me. Sorry, can you check it?
Anyway, I checked the code that you gave us. What happened is that you made duplicates of the functions. Instead, you can follow the example here: https://kriesi.at/support/topic/enfold-add-multiple-social-profile-icons/#post-739694
You can try using this code instead:
// Changer les icones socials———————–*/ function avia_add_custom_icon($icons) { $icons['fontello-mail'] = array( 'font' =>'fontello', 'icon' => 'ue800'); $icons['flaticon-ig'] = array( 'font' =>'flaticon', 'icon' => 'uf100'); 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['Fontello Mail'] = 'fontello-mail'; $icons['Flaticon Instagram'] = 'flaticon-ig'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
Let us know if you need additional help.
Best regards,
SarahMay 11, 2017 at 9:57 pm #791943Hi Sarah,
Indeed it should work but unfortunetly when I put that in my functions.php the website doesn’t load (it is why you couldn’t see the website before).
I remove everything and hopefully you will be able to have a look this time :)
Best regards,
ClémentMay 12, 2017 at 8:25 am #792141Hi Clément,
I have applied the code in your functions.php, and updated your Social Profiles settings. If you check your website now, your icons should be okay now. I used the code in my previous reply.
I also noticed that the original code used a right single quotation marks
’
. Code like this should have a single quote'
. It’s very easy to miss! :)Let us know if you need further help.
Best regards,
SarahMay 12, 2017 at 11:08 am #792212Hi Sarah !!
Thank you very much !! You can close the topic.
Best regard,
- This reply was modified 7 years, 6 months ago by Blue_Bear.
May 12, 2017 at 2:29 pm #792317Hi Blue_Bear,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- The topic ‘Social icon in top bar’ is closed to new replies.