Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #618685

    I’m using the enfold theme in WordPress and installed the restaurant demo site. I have reviews on tripadviser for the company and would like to add a link to that “social” site. But there’s no option under “your social profiles”.

    How do I add a new or custom social icon?

    • This topic was modified 8 years, 6 months ago by brandonmarcus.
    #618691

    Hi Brandon!

    Please refer to this post – http://kriesi.at/documentation/enfold/custom-social-icons/

    Regards,
    Yigit

    #618738

    I watched the video however the site doesn’t explain what file to edit the php code. What file do I add that code snippet to?

    #618771

    Hi!

    Thanks for getting back to us!

    You need to edit the functions.php file. Place it to the end of the file.

    Let me know if you need further assistance.

    Best regards,
    Jordan

    #618786

    I added the code snippet to the functions.php file and there’s no feature change in the enfold theme options page under the “social profiles” section. I still have to choose one of the pre-existing options. What is supposed to change? Can I switch the email icon for one I imported?

    #619168

    Hi!

    Have you already imported the TripAdvisor icon from Fontello (you need to do that before touching any php code)?

    Best regards,
    Josue

    #619253

    Yes. The icons have been imported.

    #619707

    OK can you hand us an admin account (via private reply)? i’ll add the icon code for you.

    #629190

    Josue, my problem its simillar to BRANDONMARCUS
    I step by step but dont appear under SOCIAL PROFILES, i want to insert Trip Advisor icon into HEADER SOCIAL ICONS

    #629531

    Adding the private info below. Please let me know when you made the change. I plan on disabling the account after you are done.

    #629540

    Thanks.. i just solve this

    #629542

    What steps did you take to solve adding custom social buttons? I don’t see where I change the icons on the website.

    #630053

    Hi,


    @brandonmarcus
    Have you added your own icon fonts already – http://kriesi.at/documentation/enfold/adding-your-own-icon-fonts/? If you have, please create a temporary admin login and post it here privately. I saw that you have previously posted logins but we will need a link to your website as well :)

    Best regards,
    Yigit

    #630073

    Yes the fontello icons have already been added.

    #630097

    Hey!

    I added following code to Functions.php file in Appearance > Editor

    // Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    	$icons['icon_name']	 = 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['Icon Label'] = 'icon_name';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);

    You have four icons in your set and you can change the icon by simply changing “ue800” up to “ue804” respectively.
    Please review your website now

    Cheers!
    Yigit

    #630139

    Thanks. I added the icon in the social profiles. When you said to change the code by changing “ue800” up to “ue804”, you mean change the line in the php function

    #630146

    Hi,

    Correct, also change ‘icon_name’ and ‘Icon Label’ respectively.

    Best regards,
    Josue

    #630158

    Ok. That doesn’t make sense. Yigit said “simply changing “ue800” up to “ue804”. The icon_name and icon_label look like they are the same. I see “array( ‘font’ =>’fontello’, ‘icon’ => ‘ue800’);” so I don’t see where I would also change the icon_name and label. Are you saying by changing the code for the custom icon, this also changes these or I would have to make some additional change?

    #630164

    Hi,

    Given the 4 icons you have imported, the code should end up looking like this:

    // Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    	$icons['icon_name1']	 = array( 'font' =>'fontello', 'icon' => 'ue800');
    	$icons['icon_name2']	 = array( 'font' =>'fontello', 'icon' => 'ue801');
    	$icons['icon_name3']	 = array( 'font' =>'fontello', 'icon' => 'ue802');
    	$icons['icon_name4']	 = array( 'font' =>'fontello', 'icon' => 'ue803');
    	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['Icon Label 1'] = 'icon_name1';
    	$icons['Icon Label 2'] = 'icon_name2';
    	$icons['Icon Label 3'] = 'icon_name3';
    	$icons['Icon Label 4'] = 'icon_name4';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);

    If you paste it like that it will work but you’re free to change the labels too.

    Best regards,
    Josue

    #630175

    I see. Thank you. I’ll try that.

    #630322

    You are welcome, glad to help :)

    Regards,
    Josue

    #666342

    Hi guys, burning the midnight oil with this. I have added the fontello zip file, I can see and use the tripadvisor icon within the theme. But it’s not showing up under Enfold Theme Options/Social Profiles.

    Here is the code that I have placed in the functions.php file.

    // Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    $icons[‘tripadvisor’] = 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[‘Trip Advisor’] = ‘tripadvisor’;
    return $icons;
    }
    add_filter(‘avf_social_icons_options’,’avia_add_custom_social_icon’, 10, 1);

    Can you see if I have done anything wrong?

    TIA!

    FYI
    When I place the icon within a text box, it works successfully:
    [av_font_icon icon='ue800' font='fontello' style='' caption='' link='' linktarget='' size='40px' position='left' color=''][/av_font_icon]

    • This reply was modified 8 years, 3 months ago by wmeida.
    #666448

    OK… I just had it placed in the wrong section of the functions.php file.
    Sorted and thank you :)

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘Add new or custom social icon’ is closed to new replies.