Custom social icons broken

Hello, I need to add Bandcamp and Spotify icon to my X theme, so I followed the instruction found on this old topic:

It works but while the links are there, all the social icons in the footer now disappeared.
How to show them again?

Many thanks

Hello Alberto,

Thanks for writing in! The code in the old thread is outdated. It may no longer work with the latest X theme or future releases. Please remove the old code.

Be advised that we now have added x_social_global_before and x_social_global_after filters that you can use so that you can easily insert icons. Just make sure that you have inserted valid PHP code. The code below is an example of how the filters should be used:

// Add Custom Social icons
// =============================================================================
function add_more_social_icons($output){
	
	// Please insert your social profile links
    $bandcamp    = '#';
    $spotify    = '#';

	// custom social profile links
  	if ( $bandcamp )  : $output .= '<a href="' . $bandcamp . '" class="bandcamp" title="BandCamp" target="_blank"><i class="x-icon-bandcamp" data-x-icon-b="&#xf2d5;" aria-hidden="true"></i></a>'; endif;
  	if ( $spotify )  : $output .= '<a href="' . $spotify . '" class="spotify" title="Spotify" target="_blank"><i class="x-icon-spotify" data-x-icon-b="&#xf1bc;" aria-hidden="true"></i></a>'; endif;

	return $output;
}
add_filter('x_social_global_after', 'add_more_social_icons');
// =============================================================================

Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Best Regards.

Now that works great, many thanks!!

Hi Alberto,

You’re welcome and it’s our pleasure to help you. If you have any other concerns regarding our theme features, feel free reach us.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.