-
AuthorPosts
-
September 27, 2023 at 6:32 pm #1420721
Hello – I have tried following the instructions here (https://kriesi.at/documentation/enfold/social-share-buttons/#how-to-add-custom-social-icons-to-enfold-options) to add the Spotify icon (I need Apple podcast too), but it’s not working for me. I must be doing something wrong.
I am not using a child theme (should I be?), so I added the code where the instructions indicate in the functions.php file and changed the icon code to uf328 for the Spotify one. Nothing happens. Now when I add the code to the top of the functions.php file, it does allow me to use a fontello icon (ue800), but not the Spotify one. I currently have the code placed below this line:
if(isset($avia_config[‘use_child_theme_functions_only’])) return;
but no addtional icons are available in the theme options.Code I am using:
if( isset( $avia_config[‘use_child_theme_functions_only’] ) )
{
return;
// Register new icon as a theme icon
function avia_add_custom_icon($icons) {
$icons[‘icon_name’] = array( ‘font’ =>’entypo-fontello’, ‘icon’ => ‘uf328’);
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);
}`Any help is appreciated.
- This topic was modified 1 year, 1 month ago by jamesedwardcouncill. Reason: clarification
September 28, 2023 at 4:38 am #1420737Hey jamesedwardcouncill,
Thank you for the inquiry.
The default character code of the Spotify icon in the entypo-fontello set is ue907. Please try to replace the filter with the following code.
// Register new icon as a theme icon function avia_add_default_social_icons($icons) { $icons['spotify'] = array( 'font' =>'entypo-fontello', 'icon' => 'ue907'); return $icons; } add_filter('avf_default_icons','avia_add_default_social_icons', 10, 1); // Add new icon as an option for social icons function avia_add_custom_social_icons($icons) { $icons['Spotify'] = 'spotify'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icons', 10, 1);
`
Best regards,
IsmaelSeptember 28, 2023 at 6:17 pm #1420829Hi Ismael – thank you for getting back to me. That code works, but can you confirm I have placed it correctly in the functions.php file, so it does not get overridden by the next theme update? Screenshot of functions.php here: https://prnt.sc/2QRwzd-Dp9JR
Also, how do I get Apple Podcast Icon as well?
Thank you for your help.
- This reply was modified 1 year, 1 month ago by jamesedwardcouncill.
September 29, 2023 at 3:57 am #1420858Hi,
Thank you for the update.
If you want the modification to remain after an update, you have to install a child theme and move the modification to the child theme’s functions.php file. If you haven’t installed a child theme yet, please check the link below.
// https://kriesi.at/documentation/enfold/child-theme/#how-child-themes-work
The Apple Podcast icon is not included in the theme by default, so you will have to find an SVG version of it and convert it to an icon font using the Fontello icon converter. You can then upload it to the Enfold > Import/Export > Iconfont Manager. Please check the documentation below for more info.
// 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.