Hello,
I just upgraded a clients website and now his social icons are broken in both the Header & Footer.

How can we fix this?
Thanks,
Micah
Hello,
I just upgraded a clients website and now his social icons are broken in both the Header & Footer.

How can we fix this?
Thanks,
Micah
I have this code in the functions file. I am assuming that the font awesome codes have changed.
// Load Font Awesome
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css' );
}
// Load Social Icons
function x_social_global() {
$facebook = x_get_option( 'x_social_facebook', '' );
$twitter = x_get_option( 'x_social_twitter', '' );
$google_plus = x_get_option( 'x_social_googleplus', '' );
$linkedin = x_get_option( 'x_social_linkedin', '' );
$xing = x_get_option( 'x_social_xing', '' );
$foursquare = x_get_option( 'x_social_foursquare', '' );
$youtube = x_get_option( 'x_social_youtube', '' );
$vimeo = x_get_option( 'x_social_vimeo', '' );
$instagram = x_get_option( 'x_social_instagram', '' );
$pinterest = x_get_option( 'x_social_pinterest', '' );
$dribbble = x_get_option( 'x_social_dribbble', '' );
$flickr = x_get_option( 'x_social_flickr', '' );
$behance = x_get_option( 'x_social_behance', '' );
$tumblr = x_get_option( 'x_social_tumblr', '' );
$whatsapp = x_get_option( 'x_social_whatsapp', '' );
$soundcloud = x_get_option( 'x_social_soundcloud', '' );
$rss = x_get_option( 'x_social_rss', '' );
$output = '<div class="x-social-global"> <div class="order_online_header_div"><a href="/order" class="order_online_header"><img src="http://www.lostoros.com/wp-content/uploads/2015/10/order_online.png" width="89" height="56" alt="Order Online" style="padding-right:7px;"/></a><a href="https://itunes.apple.com/us/app/los-toros-mexican-restaurant/id1050001497?mt=8" class="order_online_header" target="_blank" ><img src="http://www.lostoros.com/wp-content/uploads/2015/10/chow_now_itunes.png" width="89" height="56" alt="ChowNow iPhone App" style="padding-right:7px;"/></a><a href="https://play.google.com/store/apps/details?id=com.chownow.lostorosmexicanrestaurant" target="_blank" class="order_online_header"><img src="http://www.lostoros.com/wp-content/uploads/2015/10/chow_now_android.png" width="89" height="56" alt="ChowNow Android App"/></a></div>';
if ( $facebook ) : $output .= '<a href="' . $facebook . '" class="facebook" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon=""></i></a>'; endif;
if ( $twitter ) : $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-icon-twitter-square" data-x-icon=""></i></a>'; endif;
if ( $google_plus ) : $output .= '<a href="' . $google_plus . '" class="google-plus" title="Google+" target="_blank"><i class="x-icon-google-plus-square" data-x-icon=""></i></a>'; endif;
$output .= '<a href="http://www.yelp.com/biz/los-toros-mexican-restaurant-chatsworth" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon=""></i></a>';
$output .= '<a href="http://www.tripadvisor.com/Restaurant_Review-g32655-d360422-Reviews-Los_Toros_Mexican_Restaurant-Los_Angeles_California.html" class="xing" title="Trip Advisor" target="_blank"><i class="x-icon fa fa-tripadvisor"></i></a>';
if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon=""></i></a>'; endif;
if ( $xing ) : $output .= '<a href="' . $xing . '" class="xing" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon=""></i></a>'; endif;
if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon=""></i></a>'; endif;
if ( $youtube ) : $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-icon-youtube-square" data-x-icon=""></i></a>'; endif;
if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon=""></i></a>'; endif;
if ( $instagram ) : $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon=""></i></a>'; endif;
if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon=""></i></a>'; endif;
if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon=""></i></a>'; endif;
if ( $flickr ) : $output .= '<a href="' . $flickr . '" class="flickr" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon=""></i></a>'; endif;
if ( $behance ) : $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon=""></i></a>'; endif;
if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon=""></i></a>'; endif;
if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" class="tumblr" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon=""></i></a>'; endif;
if ( $soundcloud ) : $output .= '<a href="' . $soundcloud . '" class="soundcloud" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon=""></i></a>'; endif;
if ( $rss ) : $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon=""></i></a>'; endif;
$output .= '</div>';
echo $output;
}
Hi there,
Thanks for writing in! If you’ve cleared your cache and you’re still seeing this problem it could be because the icons have been customized with a child theme. If that’s the case you’ll need to replace data-x-icon with data-x-icon-b to make your social icons load again.
Take a look at this thread for an example: https://theme.co/apex/forum/t/social-icons-custom-in-footer-have-gone-after-update/38535/55
Hope this helps!
Hello,
I did as you asked an now most of the icons are fixed. The YouTube & RSS Icons are still broken and I don’t know how to get them working.
Server cache is disabled.
Here is my updated code.
// Load Social Icons
function x_social_global() {
$facebook = x_get_option( 'x_social_facebook', '' );
$twitter = x_get_option( 'x_social_twitter', '' );
$google_plus = x_get_option( 'x_social_googleplus', '' );
$linkedin = x_get_option( 'x_social_linkedin', '' );
$xing = x_get_option( 'x_social_xing', '' );
$foursquare = x_get_option( 'x_social_foursquare', '' );
$youtube = x_get_option( 'x_social_youtube', '' );
$vimeo = x_get_option( 'x_social_vimeo', '' );
$instagram = x_get_option( 'x_social_instagram', '' );
$pinterest = x_get_option( 'x_social_pinterest', '' );
$dribbble = x_get_option( 'x_social_dribbble', '' );
$flickr = x_get_option( 'x_social_flickr', '' );
$behance = x_get_option( 'x_social_behance', '' );
$tumblr = x_get_option( 'x_social_tumblr', '' );
$whatsapp = x_get_option( 'x_social_whatsapp', '' );
$soundcloud = x_get_option( 'x_social_soundcloud', '' );
$rss = x_get_option( 'x_social_rss', '' );
$output = '<div class="x-social-global"> <div class="order_online_header_div"><a href="/order" class="order_online_header"><img src="http://www.lostoros.com/wp-content/uploads/2015/10/order_online.png" width="89" height="56" alt="Order Online" style="padding-right:7px;"/></a><a href="https://itunes.apple.com/us/app/los-toros-mexican-restaurant/id1050001497?mt=8" class="order_online_header" target="_blank" ><img src="http://www.lostoros.com/wp-content/uploads/2015/10/chow_now_itunes.png" width="89" height="56" alt="ChowNow iPhone App" style="padding-right:7px;"/></a><a href="https://play.google.com/store/apps/details?id=com.chownow.lostorosmexicanrestaurant" target="_blank" class="order_online_header"><img src="http://www.lostoros.com/wp-content/uploads/2015/10/chow_now_android.png" width="89" height="56" alt="ChowNow Android App"/></a></div>';
if ( $facebook ) : $output .= '<a href="' . $facebook . '" class="facebook" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $twitter ) : $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-icon-twitter-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $google_plus ) : $output .= '<a href="' . $google_plus . '" class="google-plus" title="Google+" target="_blank"><i class="x-icon-google-plus-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
$output .= '<a href="http://www.yelp.com/biz/los-toros-mexican-restaurant-chatsworth" class="rss" title="Yelp" target="_blank"><i class="x-icon-rss-square" data-x-icon-b=""></i></a>';
$output .= '<a href="http://www.tripadvisor.com/Restaurant_Review-g32655-d360422-Reviews-Los_Toros_Mexican_Restaurant-Los_Angeles_California.html" class="xing" title="Trip Advisor" target="_blank"><i class="x-icon fa fa-tripadvisor"></i></a>';
if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $youtube ) : $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-icon-youtube" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $xing ) : $output .= '<a href="' . $xing . '" class="xing" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $instagram ) : $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $flickr ) : $output .= '<a href="' . $flickr . '" class="flickr" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $github ) : $output .= '<a href="' . $github . '" class="github" title="GitHub" target="_blank"><i class="x-icon-github-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $behance ) : $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" class="whatsapp" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $soundcloud ) : $output .= '<a href="' . $soundcloud . '" class="soundcloud" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $rss ) : $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
$output .= '</div>';
echo $output;
}
Hello There,
You will need to update your code with this code block:
if ( $facebook ) : $output .= '<a href="' . $facebook . '" class="facebook" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $twitter ) : $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-icon-twitter-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $google_plus ) : $output .= '<a href="' . $google_plus . '" class="google-plus" title="Google+" target="_blank"><i class="x-icon-google-plus-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $xing ) : $output .= '<a href="' . $xing . '" class="xing" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $youtube ) : $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-icon-youtube-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $instagram ) : $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $flickr ) : $output .= '<a href="' . $flickr . '" class="flickr" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $github ) : $output .= '<a href="' . $github . '" class="github" title="GitHub" target="_blank"><i class="x-icon-github-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $behance ) : $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" class="whatsapp" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $soundcloud ) : $output .= '<a href="' . $soundcloud . '" class="soundcloud" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon-b="" aria-hidden="true"></i></a>'; endif;
if ( $rss ) : $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon-s="" aria-hidden="true"></i></a>'; endif;
We would loved to know if this has work for you. Thank you.
Thanks, that resolved my issue.
Micah
You’re welcome!
It’s good to know that it has worked for you.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.