-
AuthorPosts
-
February 27, 2024 at 4:54 pm #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,
philFebruary 28, 2024 at 9:07 am #1435688Hey 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,
IsmaelFebruary 29, 2024 at 2:22 pm #1435884Hi Ismael,
thank you for your support, everything works fine :-)Best regards Phil
February 29, 2024 at 5:00 pm #1435899 -
AuthorPosts
- You must be logged in to reply to this topic.