Tagged: x
-
AuthorPosts
-
February 3, 2017 at 12:37 pm #1357046
IAmSuperMikeParticipantHi Guys,
I am trying to figure out how to add a custom social icon (telegram) to my footer.
I have followed the steps in the below post to add the custom field (yelp) but i am wondering how i would go about changing the icon that is displayed?
February 3, 2017 at 5:38 pm #1357355
FriechModeratorHi There,
Thanks for writing in! On the given code on that post, please update this line:
<i class="x-icon-yelp" data-x-icon=""></i></a>to this:
<i class="x-icon-telegram" data-x-icon=""></i></a>If that does not work, please provide us login credentials (wp-admin and FTP) in private reply so we can take a closer look.
Cheers!
February 3, 2017 at 6:03 pm #1357367
IAmSuperMikeParticipantThis reply has been marked as private.February 3, 2017 at 6:04 pm #1357370
IAmSuperMikeParticipantThis reply has been marked as private.February 4, 2017 at 1:05 am #1357694
ChristopherModeratorHi there,
Did you follow our previous replay https://community.theme.co/forums/topic/custom-social-icon-3/#post-1357355 ?
Please update your code to :<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= // Change menu based on login-status function my_wp_nav_menu_args( $args = '' ) { if( is_user_logged_in() ) { $args['menu'] = 'logged-in'; } else { $args['menu'] = 'logged-out'; } return $args; } add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' ); // End of function // Remove admin bar for non admins add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } } // end of function // ============================================================================= // Re-order Social Output and adding new icon // ============================================================================= if ( ! function_exists( 'x_social_global' ) ) : function x_social_global() { $facebook = x_get_option( 'x_social_facebook', '' ); $youtube = x_get_option( 'x_social_youtube', '' ); $vimeo = x_get_option( 'x_social_vimeo', '' ); $yelp = 'TELEGRAM URL HERE'; $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', '' ); $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">'; 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 ( $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; 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 ( $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-email" 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 .= '<a href="#" class="yelp" title="Our Public Telegram" target="_blank"><i class="x-icon-telegram" data-x-icon=""></i></a>'; $output .= '</div>'; echo $output; } endif; //end of social functionThanks.
February 4, 2017 at 9:29 am #1357913
IAmSuperMikeParticipantyes, i tried that. it didnt work.
I have replaced my funcitons.php with the one you provided and it is exactly the same.
As per my last response please see screenshots to see what is shown AFTER making the changes you suggested.
February 4, 2017 at 9:30 am #1357914
IAmSuperMikeParticipantOne other thing, if i have not defined x-icon-telegram then how will it know what ti display….
February 4, 2017 at 12:34 pm #1357991
IAmSuperMikeParticipantI have tried using the font awesome code and copying the actual icon in there, but both times it just loads a blank . square… not sure if this helps
February 4, 2017 at 12:37 pm #1357992
IAmSuperMikeParticipantIn the interim i have used:
fa-send-o (alias) []from v4.1 — i have noticed that none of the 4.7 icons will load.
February 4, 2017 at 3:25 pm #1358075
RadModeratorHi there,
It’s best if we can check it directly, would you mind providing the site’s URL?
Thanks!
February 5, 2017 at 10:36 am #1358664
IAmSuperMikeParticipantThis reply has been marked as private.February 5, 2017 at 5:58 pm #1358927
Rue NelModeratorHello There,
Thanks for providing the url. All of the data-x-icon values is not correct.

Please make use of this code instead. You have to copy the raw code from here http://pastebin.com/QkFmxu8J to preserve the unicode html entities or the data-x-icon values.
Hope this helps. Kindly let us know.
February 11, 2017 at 5:54 am #1366926
IAmSuperMikeParticipantthanks.
February 11, 2017 at 6:21 am #1366951
ThaiModeratorYou’re most welcome 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1357046 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
