-
AuthorPosts
-
June 3, 2016 at 6:23 am #642395
Hi,
I’m trying to use a social icon which I don’t see in the social profile dropdown, but it is part of the default font in Enfold.
I have followed all the instructions as stated in this thread
https://kriesi.at/support/topic/use-different-social-icons/Added this code in functions.php file using the editor tool in wordpress:
add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); function avia_add_custom_icon($icons) { $icons['sina-weibo'] = array( 'font' =>'entypo-fontello', 'icon' => 'ue92b'); return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1); function avia_add_custom_social_icon($icons) { $icons['sina-weibo'] = 'sina-weibo'; return $icons; }
but my icon still doesn’t appear in the social profiles dropdown
Please help
June 4, 2016 at 9:12 am #642880Hey natying,
We need to take a closer look please post us your login credentials (in the “private data” field), so we can take a look at your backend.
Login credentials include:
- the URL to the login screen
- a valid username (with full administration capabilities)
- as well as a password for that username
Best regards,
VinayJune 6, 2016 at 4:05 am #643234OK,
Link to my website, login credentials, FTP credentials are provided here as private content.
Thanks for helping out
Natalie
June 6, 2016 at 10:41 pm #643684Hi,
does it work for you when using the exact same code from here instead of your code? Please let us know about your results.
Best regards,
AndyJune 7, 2016 at 5:25 am #643780Hi Andy,
Yes, that’s the code I copy and pasted and changed the icon name and code to Sina-weibo, but it doesn’t work
Also, whenever I add the code into the functions.php file, the site goes down and my programmer friend said “redeclare avia_add_custom_icon() to cause the issue”
Can anyone help me add the sina-weibo icon in the social profile dropdown box so that I can add weibo as an option in the social share widget please?
June 7, 2016 at 7:03 am #643822Hi both,
Funnily enough I’m trying to do exactly the same thing today (add a Weibo icon).
I can’t make it work either.
Code seems to be fine in functions.php but nothing showing up in the drop-down options on the ‘Social Profiles’ page in Enfold settings.I’ll keep trying things, if I find anything I’ll share…
Cheers,
MikeJune 7, 2016 at 8:37 am #643859Hi Mike,
I tried other icons (ie: spotify) and it doesn’t show either. I even asked my programmer friend and she doesn’t have a clue why it isn’t showing up.
Hope you can find the solution Mike!
Thanks,
NatalieJune 7, 2016 at 11:14 am #643954Hi,
what happens if you use the exact same code instead of changing anything? does it work for you or not?
Best regards,
AndyJune 7, 2016 at 12:19 pm #643991Hi Andy,
Yeah, I tried exactly the same code from that link, copied into my functions.php file. It doesn’t work.
I would expect to see ‘Apple’ and ‘Yelp’ on the drop-down list on the Enfold >> Social Profiles page, yes? They’re not there.I’ve made some other changes to functions.php today which worked fine, so it’s definitely going into the right file.
I’m afraid I’m on a local install at the moment so can’t give any kind of remote access. I’ll keep an eye on this thread to see if it can be solved for Natalie. Otherwise when I have remote access available I’ll follow up.
Cheers,
MikeJune 7, 2016 at 1:47 pm #644046Hi,
did you try this already?
Best regards,
AndyJune 8, 2016 at 7:50 am #644589Hi Andy,
Yes. I tried this exactly. I notice that some code snippets have the font name as ‘fontello’, although the default I’m using seems to be ‘entypo-fontello’. I tried it both ways to see if it made any difference. It doesn’t.
Not sure how Natalie is getting on. Sorry, didn’t intend to hijack your thread :)
Cheers,
MikeJune 8, 2016 at 12:37 pm #644774Hi,
well if both work for you then great, isn’t it?
Let us know in a new ticket if you have some more questions about the theme and we are happy to assist you.Best regards,
AndyJune 8, 2016 at 1:31 pm #644806Ah sorry that was unclear grammar from me.
I tried it both ways. It doesn’t work either way.
So still having the problem.This is going on the back-burner for me for a week or so, then I’ll have another crack at it.
Cheers,
mikeJune 8, 2016 at 3:06 pm #644871Hi,
as written in the documentation: you may need to change “fontello” to the name of the imported font (you can check that in Enfold > Import/Export > Iconfont Manager) and “ue800” for the icon code of the Icon you want to use (most of the times is ue800).
Best regards,
AndyJune 10, 2016 at 4:59 am #645984Hi Mike and Andy,
I have tried both ways and still not working :(
The Sine weibo icon is already part of the default icon used in the Enfold theme, so I used the same font type “entypo-fontello” , and the icon code is ue92b
What do you mean by “most of the times is ue800? i thought each icon code is unique to the font type?
I’m making the changes in functions.php that resides inside the enfold theme. (Enfold: Theme Functions (functions.php). Is this the right one?
I see another php file called functions-enfold.php. I suppose its not this one right?Mike, if you can find the solution please let me know. Thanks much!
Natalie
June 10, 2016 at 5:39 am #646016I just tried using another sina weibo font from other fontello icons (ie: font awesome), used ue800 (which I found out is the default code as you add icon fonts) and icon name is just ‘weibo’, but it still won’t work!!
add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); function avia_add_custom_icon($icons) { $icons['weibo'] = array( 'font' =>'awesome', 'icon' => 'ue800'); return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1); function avia_add_custom_social_icon($icons) { $icons['weibo'] = 'weibo'; return $icons; }
This is really frustrating
June 10, 2016 at 11:45 pm #646424Hi,
use this code instead:
/* * Register new icon as a theme icon */ function avia_add_custom_icon($icons) { $icons['weibo'] = array( 'font' =>'awesome', '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['weibo'] = 'weibo'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
Best regards,
AndyJune 13, 2016 at 11:12 am #647273Hi Andy and Mike,
I tried using your code but still doesn’t work.
My friend taught me a quick fix without hacking into the codes.Just go to functions.php, find the section that shows all the default font icons used in the theme. Under //social
find a social media icon that you don’t need and just replace the icon code.For example, I replaced flickr’s icon code with sina weibo’s icon code
'flickr' => array( 'font' =>'entypo-fontello', 'icon' => 'ue92b'),
Do not change “flickr” to “sinaWeibo”! Only change the icon code
Then, in the social profiles dropdown box, select flickr and insert the URL for weibo. The sina weibo icon should appear in the frontend.My friend said, “The reason why the code that was provided to us doesn’t work probably because we still need to define the hover effect and other stuff related to social icon in some hidden place.”
Other than this solution, me and my programmer friends can’t find other solutions other than hacking into the codes.
Hope this helps Mike!
Cheers,
Natalie- This reply was modified 8 years, 6 months ago by natying.
June 13, 2016 at 5:02 pm #647518Hi,
alright, thanks for sharing your solution with us. I ask some of my team mates to check this thread. Let’s see if they have any more inside into this.
Best regards,
AndyJune 14, 2016 at 8:10 am #647834Thanks for the share Natalie!
That’s a nice work around for the time being.
Obviously, when you mouseover the icon, the tooltip hover will say ‘Flickr’, so it’s not 100% there, but definitely a good startOn my site my social icons are Facebook, Twitter, YouTube, Weibo… I can imagine people thinking “Wait… what’s that icon?”
Then they hover over and it says Flickr. A little confusing :)Andy: Thanks. Be good to bottom it out. Maybe there’s a restriction on the array size or something?
June 17, 2016 at 3:53 am #649514Hi,
Please move the code below line 17 of the functions.php file or create a child theme.
/* * Register new icon as a theme icon */ function avia_add_custom_icon($icons) { $icons['weibo'] = array( 'font' =>'entypo-fontello', 'icon' => 'ue92b'); 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['weibo'] = 'weibo'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
Best regards,
IsmaelJune 17, 2016 at 11:18 am #649715Oops, I found out what I did wrong earlier…Works perfectly now!!!!
Thanks!
- This reply was modified 8 years, 6 months ago by natying.
June 17, 2016 at 11:36 am #649719hm – ismael – seems to be the code of post 1 here in the thread.
Difference is instead of sina-weibo you used weibo and the add filter option comes after the function. And this maybe the important difference you used on add custom icon the entypo-fontello option.
Which of those changings is the important one. Is the order important too ?June 21, 2016 at 4:05 am #651212Hi,
The first code is actually correct but in the second suggested code, they modified the font and icon value:
$icons['weibo'] = array( 'font' =>'awesome', 'icon' => 'ue800');
And that’s why it’s not working.
Best regards,
IsmaelJuly 13, 2016 at 12:18 am #660158Having issues with this as well and cant peice together what I did wrong. Code is below:
Downloaded and imported the yelp icon from fontello. I see it in tools like Icon List but can not get a new category in social profiles to show up.
// Register new icon as a theme icon
function avia_add_custom_icon($icons) {
$icons[‘yelp’] = array( ‘font’ =>’fontello’, ‘icon’ => ‘uf1e9’);
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[‘Yelp’] = ‘yelp’;
return $icons;
}
add_filter(‘avf_social_icons_options’,’avia_add_custom_social_icon’, 10, 1);July 13, 2016 at 1:22 pm #660369Hi,
Please start a new thread and post admin login details in private so that we can have a closer look.
Best regards,
RikardJuly 3, 2018 at 12:30 pm #980523Hello ,
I have added yelp icon code to my function.php.I can find that my yelp link is added everything is working fine but icon is not coming.
// Register new icon as a theme icon
function avia_add_custom_icon($icons) {
$icons[‘yelp’] = array( ‘font’ =>’fontello’, ‘icon’ => ‘uf1e9’);
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[‘yelp’] = ‘yelp’;
return $icons;
}
add_filter(‘avf_social_icons_options’,’avia_add_custom_social_icon’, 10, 1);I am sharing my site details in private details.Please check.
July 4, 2018 at 2:41 am #980853Hi,
Did you import the yelp icon by way of Iconfont Manager? Please post the login details in the private field.
Best regards,
IsmaelJuly 4, 2018 at 7:26 am #980951Hi,
Yes i imported.But still it is not working i am sharing my details in private message please find.
Regards,
NikishaJuly 5, 2018 at 11:18 am #981519Hi,
Thanks for the update.
There’s nothing in the “Iconfont Manager” section. Please upload a yelp icon from fontello.
// https://kriesi.at/documentation/enfold/icon/#adding-your-own-fontello-or-flaticon-icons-
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.