Skip to content

Snippet: Use a Custom SVG for Social Share Icon

If you wish to use a custom SVG for any of the theme's social share items you can use the "wpex_social_share_items" filter to modify the social item settings, specifically the "icon" parameter.

/**
 * Modify the social icons.
 *
 * @link https://totalwptheme.com/docs/snippets/customize-social-share-icons/
 */
add_filter( 'wpex_social_share_items', function( $items ) {
    $items['twitter']['icon']  = 'YOUR_SVG_CODE_HERE';
    return $items;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top