Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #279773

    Friech
    Moderator

    Hi There,

    Child Theme needs to be setup. This allows you to make code changes that won’t be overwritten when an X update is released. Then simply paste the code to Child theme’s functions.php file.

    How to Setup Child Themes

    Hope it helps, Cheers!

    #309192

    leomrus
    Participant
    #309210

    Christopher
    Moderator

    Hi there,

    Please update X, install Cornerstone from X Addons -> Extensions and disable X shortcodes plugin as this should fix your issue.

    Thanks.

    #309460

    leomrus
    Participant

    Great! You are the best!)))

    #309461

    leomrus
    Participant

    Only one small thing)))

    All icons are animated, Vk not(((

    #309544

    Thai
    Moderator

    Hi There,
    Try adding following CSS under Appearance > Customize > Custom > CSS:

    .x-social-global a:hover.vk {
      background-color: #45668e;
    }

    Hope it helps.

    #312645

    Referee
    Participant

    Maybe you could consider adding VK in future releases of X? Russian community of X is growing. 🙂 I see that you have added quite a few other social networks already on top of what you had in X initially.

    Styling might be slightly different depending on Stack used (background-color: #45668e; or color: #45668e;). But your code work perfectly, thanks!

    #312834

    Zeshan
    Member

    Hi Referee,

    We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!

    #312891

    leomrus
    Participant

    Many thanks for your help!

    It will be great if you will add vk in future release! ))

    #313087

    Friech
    Moderator

    Thank you for understanding. Cheers!

    #331133

    idanrub
    Participant

    Hi,

    is there any way i can show a social icon (whatsapp in my case) without a link just a text when i hover over it?

    and how can i change the hover text? i saw it on a differant thread but cant seem to find it now.

    And another thing ive added an contact us link according to this thread i want to use a differant icon instead of the envelope, Ive searched the icon library and didnt find the @ sign, how do i do it manually?

    Thanks.

    #331304

    Nabeel A
    Moderator

    Hi there,

    Thanks for writing in! There’s already a support for Whatsapp icon in Appearance > Social > Whatsapp Profile URL if you don’t want to link it then just enter # in the field. To change the hover text you’ll need to add the icon manually, here is how you can do it. Setup a child theme first and then paste the following code in your child theme’s functions.php file:

    if ( ! function_exists( 'x_social_global' ) ) :
      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">';
    
          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;
          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 .= '<a style="position: relative;top: -2px;" data-toggle="tooltip" data-placement="bottom" data-trigger="hover" href="#" class="whatsapp" title="whatsapp title text" target="_blank"><i class="x-icon-whatsapp" data-x-icon=""></i></a></div>';
    
        echo $output;
    
      }
    endif;

    In the third last line, change the title attribute to something of your own and customize it as per you need. I noticed the icon is getting rendered here since the forum supports html, so here is code for the icon data-x-icon=”&#xf232;

    In regards to your other query, would you mind providing the URL of the page so we can have a look?

    Let us know how this goes!

    #333692

    idanrub
    Participant
    This reply has been marked as private.
    #333712

    Christopher
    Moderator

    Hi there,

    please try this code and add it in style.css file :

    .x-icon-envelope:before {
      content: "\f0e0";
    }

    instead of f0e0 put your icon unicode.

    Thanks.

    #338273

    idanrub
    Participant

    The whatsapp icon works with the hover text but when i pasted yor latest code to my functions.php file the custom contact us icon i made is gone, Ive tried to add this code in the above code and it made a mass of the entire header.

    this is the code:

    $output .= ‘<i class=”x-icon-envelope”></i></div>’;

    I somehow need to put this two lines of codes together without creating another div:

    $output .= ‘<i class=”x-icon-whatsapp” data-x-icon=””></i></div>’;

    $output .= ‘<i class=”x-icon-envelope”></i></div>’;

    Thanks again.