
-
AuthorPosts
-
March 25, 2025 at 10:30 am #1480119
Hi,
This post follows my post Setting up two new social profiles under Enfold 7.1. Sorry if i was not clear in my original thread.
I wish to use the new SVG features of Enfold 7.x to add two new Social Profiles.
The advice in the linked thread works fine however this does not seem to be using SVG.
Is this by design (Social Profiles do not yet support custom SVG’s?) or is there a newer/better guide?
Thank you :-)
March 26, 2025 at 5:30 am #1480180Hey dogsbody,
Thank you for the inquiry.
The process should be the same for SVG icons. Create a folder called “svg”, place the “bluesky.svg” and “mastodon.svg” file inside, compress or archive the folder to a zip file and name it “social”, then upload it to the SVG Iconset and Iconfont Manager. You may need to delete the previous icons to avoid conflict.
Add this in the functions.php file to register the social icons:
function avia_add_custom_icon($icons) { $icons['mastodon'] = array('font' => 'svg_social', 'icon' => 'mastodon'); $icons['bluesky'] = array('font' => 'svg_social', 'icon' => 'bluesky'); return $icons; } add_filter('avf_default_icons', 'avia_add_custom_icon', 10, 1); function avia_add_custom_social_icon($icons) { $icons['mastodon'] = 'mastodon'; $icons['bluesky'] = 'bluesky'; 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) { $mastodon = array('mastodon' => array("encode" => true, "encode_urls" => false, "pattern" => "https://www.mastodon.com/", 'label' => __("Share on mastodon", 'avia_framework'))); $bluesky = array('bluesky' => array("encode" => true, "encode_urls" => false, "pattern" => "https://www.bluesky.com/", 'label' => __("Share on bluesky", 'avia_framework'))); $args = array_merge($mastodon, $bluesky, $args); return $args; }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.