💬 Replied to: A manual tweak for icons in the Syndication Links plugin

“I’m not sure why I had never manually done the fix before, but I’ve had issues1 2 with the Syndication Links plugin showing icons for the reading.am service and my old chrisaldrich.wordpress”

BoffoSocko

My gut was right 😃. You can add extra icons without editing the plugin, by adding something similar to this to your theme’s functions.php file:

function wp4632_extra_site_icons( $return, $url) {
	$sites = array(
		'chrisaldrich.wordpress.com' => 'wordpress',
		'www.reading.am' => 'book',
	);
	$parsed = parse_url( $url );
	$return = false;
	if ( false !== $parsed ) {
		$host = $parsed['host'];
		if ( array_key_exists( $host, $sites ) ) {
			$return = $sites[ $host ];
		}
	}
	return $return;
}
add_filter( 'syn_link_mapping', 'wp4632_extra_site_icons', 10, 2);

For maximum upgrade safety, I put modifications like this into a child theme.

Without similar code in my theme, this post doesn’t display the (test) Mastodon syndication link… but with it the link and icon are displayed. The $sites array can be modified with any URLs you want mapped to a suitable icon in the set.

Hope this helps you out!