Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1435602

    Hi Support Team,

    I used your script in the documentation (https://kriesi.at/documentation/enfold/social-share-buttons/#how-to-add-custom-social-icons-to-enfold-options) to register a new facebook-icon for use in the Enfold > Social Profiles Area – everything works fine.
    Now I would like to add another new insta-icon the same way.

    Could you please help me to extend/alter the script in the functions.php?

    best regards,
    phil

    #1435688

    Hey phil-0071,

    Thank you for the inquiry

    You can duplicate this line to create another icon. Simply add it below the existing one:

    $icons['Icon Label'] = 'icon_name';
    

    To assign an icon to the new social icon, simply duplicate this line similarly above.

    $icons['icon_name'] = array( 'font' =>'fontello', 'icon' => 'ue800');
    

    If you want to add 3 icons, for example, the filter should look something like this:

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

    Make sure to update the value of the “icon” attribute.

    $icons['new_icon_name'] = array( 'font' =>'fontello', 'icon' => 'ue800');
    

    Best regards,
    Ismael

    #1435884

    Hi Ismael,
    thank you for your support, everything works fine :-)

    Best regards Phil

    #1435899

    Hi,

    Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

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