Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1357046
    IAmSuperMike
    Participant

    Hi 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?

    https://community.theme.co/forums/topic/add-custom-social-link-in-footer-increase-font-size-of-portfolio-category-filte/

    #1357355
    Friech
    Moderator

    Hi 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="&#xf2c6;"></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!

    #1357367
    IAmSuperMike
    Participant
    This reply has been marked as private.
    #1357370
    IAmSuperMike
    Participant
    This reply has been marked as private.
    #1357694
    Christopher
    Moderator

    Hi 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 function

    Thanks.

    #1357913
    IAmSuperMike
    Participant

    yes, 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.

    #1357914
    IAmSuperMike
    Participant

    One other thing, if i have not defined x-icon-telegram then how will it know what ti display….

    #1357991
    IAmSuperMike
    Participant

    I 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

    #1357992
    IAmSuperMike
    Participant

    In the interim i have used:
     fa-send-o (alias) []

    from v4.1 — i have noticed that none of the 4.7 icons will load.

    #1358075
    Rad
    Moderator

    Hi there,

    It’s best if we can check it directly, would you mind providing the site’s URL?

    Thanks!

    #1358664
    IAmSuperMike
    Participant
    This reply has been marked as private.
    #1358927
    Rue Nel
    Moderator

    Hello 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.

    #1366926
    IAmSuperMike
    Participant

    thanks.

    #1366951
    Thai
    Moderator

    You’re most welcome 🙂

  • <script> jQuery(function($){ $("#no-reply-1357046 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>