Looking to add a TikTok icon button using the “Social Buttons” module but it is not allowing us to add this.
Below is the code we are trying:
// Register new icon as a theme icon
function avia_add_custom_icon($icons) {
$icons[‘tiktok’] = array( ‘font’ =>’fontello’, ‘icon’ => ‘e800’);
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[‘TikTok’] = ‘tik-tok’;
return $icons;
}
add_filter(‘avf_social_icons_options’,’avia_add_custom_social_icon’, 10, 1);
add_filter(‘avia_social_share_link_arguments’, ‘avia_add_social_share_link_arguments’, 10, 1);
function avia_add_social_share_link_arguments($args){
$tiktok = array(‘tiktok’ => array(“encode”=>true, “encode_urls”=>false, “pattern” => https://www.tiktok.com/, ‘label’ => __(“Share on TikTok”,’avia_framework’)));
$args = array_merge($tiktok, $args);
return $args;
}
Hey Ryan,
Thank you for the inquiry.
Did you add the code in the functions.php file? Please provide the login details in the private field so that we can check the modification. Make sure that the Appearance > Theme File Editor is accessible.
Best regards,
Ismael
Actually went back and looked and had inadvertently added to incorrect file. With a few tweaks got the added TikTok icon to show. Thank you for the quick reply!