-
AuthorPosts
-
July 1, 2015 at 9:24 pm #318884
Hey There,
Thanks for updating this thread!
With the release of X 4.0, we made a big change with the icons. Please see the changelog explaining the icon changes here: https://theme.co/changelog/#theme-4-0-0
We have check your other threads and found out you want to add yelp in the social icons. To do that, you will need to set up a child theme. What you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Once your child theme is ready, please try to add this code in your child theme’s functions.php file
// Custom Social Output // // Adding Yelp // ============================================================================= 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', '' ); $yelp = 'http://your-yelp-link-here/'; $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; if ( $yelp ) : $output .= '<a href="' . $yelp . '" class="yelp" title="Yelp" target="_blank"><i class="x-icon-yelp" data-x-icon=""></i></a>'; endif; $output .= '</div>'; echo $output; } endif;
Please check out the raw code here: http://pastebin.com/gucYKu3R
We’d love to know if this helped you.
July 2, 2015 at 11:29 am #319371This worked great. I replaced soundcloud for yelp. That worked.
Are we limited to this amount of icons or can you add new ones in the list?
I’m trying to add or replace WhatsApp with an email icon.
What am I missing in this string. It’s not picking it up.
if ( $email ) : $output .= ‘<i class=”x-icon-envelope-o” data-x-icon=””></i>‘; endif;
I would also consider adding an email option in the theme moving forward.
Thanks!
CDSJuly 2, 2015 at 6:31 pm #319696Hi There,
Yes, you could add a new social icon, after you add the new icon line.
if ( $emailme ) : $output .= '<a href="mailto:' . $emailme . '" title="Email"><i class="x-icon-email" data-x-icon=""></i></a>'; endif;
Then define your
$email
variable above with your email$emailme = 'johndoe@gmail.com';
Hope it helps, Cheers!
July 2, 2015 at 6:49 pm #319705To replace Whatsapp with an email icon replace this line:
if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" class="tumblr" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon=""></i></a>'; endif;
With this:
if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" class="tumblr" title="Whatsapp" target="_blank"><i class="x-icon-email" data-x-icon=""></i></a>'; endif;
Hope this helps.
July 3, 2015 at 1:14 pm #320357Perfect. Thanks!
July 3, 2015 at 1:23 pm #320362Nope. There’s actually not an “email” icon that I can find on your icons page for integrity.
And the mouseover still reads “Whatsapp.”
Close though?
July 4, 2015 at 12:26 am #320675Hi there,
Please provide us with URL and code you are using in functions.php file, I see there are two responses.
Thanks.
December 9, 2015 at 4:44 pm #699937Hi there
How do you adjust the height of your custom icon using the code below:
.x-topbar .x-social-global .x-icon-pinterest-square:before {
content: url(http://www.mad-daily.com/wp-content/uploads/2015/12/social-subscribe.jpg);
}Cheers
December 9, 2015 at 8:15 pm #700247Hello Severo,
You can change your CSS to this:
.x-topbar .x-social-global .x-icon-pinterest-square:before { background-image: url('http://www.mad-daily.com/wp-content/uploads/2015/12/social-subscribe.jpg'); color: transparent; font-size: 52px; /*Adjust this to height/width of custom icon*/ background-size: contain; background-position: center; background-repeat: no-repeat; }
Hope this helps.
March 10, 2016 at 11:38 am #832307Hey I’m wanting to add houzz logo to my top bar. i have tried the previous recommendation but the x-icon still stays the same. Can you help me out with that?
March 10, 2016 at 12:20 pm #832382I actually did get the icon to upload however, it doesn’t line up correctly with the other. Here is the web address to see what i’m talking about. – http://peacock.cunninghamadv.com/
March 10, 2016 at 6:28 pm #832811Hello There,
Thanks for updating this thread! Instead of adding this custom css:
.x-topbar .x-social-global .x-icon-behance-square:before { content: url(http://peacock.cunninghamadv.com/wp-content/uploads/2016/03/houzz_logo.png); }
Please remove this from your customizer and have this code added in your child theme’s style.css. This code will only work in your child theme’s style.css because the customizer removes slash and backward slashes automatically for security purposes.
#top .x-social-global .x-icon-behance-square:before { content: "\f27c"; }
This code replaces the behance icon with a houzz icon (http://prntscr.com/adpvpy)
We would loved to know if this has work for you. Thank you.
March 14, 2016 at 4:39 pm #837625Yes. That worked thank you!!!!
March 14, 2016 at 10:32 pm #837973We’re delighted to assist you with this.
Cheers!
May 14, 2016 at 4:16 pm #991578This worked for me too, but when I hover over the new Houzz icon, the tooltip still says Behance. Is there a quick way to change it to Houzz?
Thanks!
Cindy -
AuthorPosts