Viewing 30 posts - 1 through 30 (of 34 total)
  • Author
    Posts
  • #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

    #642880

    Hey 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,
    Vinay

    #643234

    OK,

    Link to my website, login credentials, FTP credentials are provided here as private content.

    Thanks for helping out

    Natalie

    #643684

    Hi,

    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,
    Andy

    #643780

    Hi 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?

    #643822

    Hi 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,
    Mike

    #643859

    Hi 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,
    Natalie

    #643954

    Hi,

    what happens if you use the exact same code instead of changing anything? does it work for you or not?

    Best regards,
    Andy

    #643991

    Hi 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,
    Mike

    #644046

    Hi,

    did you try this already?

    Best regards,
    Andy

    #644589

    Hi 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,
    Mike

    #644774

    Hi,

    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,
    Andy

    #644806

    Ah 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,
    mike

    #644871

    Hi,

    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,
    Andy

    #645984

    Hi 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

    #646016

    I 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

    #646424

    Hi,

    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,
    Andy

    #647273

    Hi 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, 5 months ago by natying.
    #647518

    Hi,

    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,
    Andy

    #647834

    Thanks 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 start

    On 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?

    #649514

    Hi,

    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,
    Ismael

    #649715

    Oops, I found out what I did wrong earlier…Works perfectly now!!!!

    Thanks!

    • This reply was modified 8 years, 5 months ago by natying.
    #649719

    hm – 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 ?

    #651212

    Hi,

    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,
    Ismael

    #660158

    Having 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);

    #660369

    Hi,

    Please start a new thread and post admin login details in private so that we can have a closer look.

    Best regards,
    Rikard

    #980523

    Hello ,

    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.

    #980853

    Hi,

    Did you import the yelp icon by way of Iconfont Manager? Please post the login details in the private field.

    Best regards,
    Ismael

    #980951

    Hi,

    Yes i imported.But still it is not working i am sharing my details in private message please find.

    Regards,
    Nikisha

    #981519

    Hi,

    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

Viewing 30 posts - 1 through 30 (of 34 total)
  • You must be logged in to reply to this topic.