Tagged: x
-
AuthorPosts
-
March 1, 2017 at 2:47 pm #1390892
Adrian TParticipantHi i tried using the code below to add the tripadvisor icon to my footer. I saw it in a thread before the problem is only my actual social icons are showing (facebook + instagram).
Did I do something wrong?
// Social Output // ============================================================================= if ( ! function_exists( 'x_social_global' ) ) : function x_social_global() { $facebook = x_get_option( 'x_social_facebook', 'https://www.tripadvisor.com.pe/' ); $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', '' ); $tripadvisory = 'https://www.tripadvisor.com.pe/'; $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-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; if ( $tripadvisory ) : $output .= '<a href="' . $tripadvisory . '" class="tripadvisor" title="tripadvisor"><i class="x-icon-tripadvisor" data-x-icon=""></i></a>'; endif; $output .= '</div>'; echo $output; } endif;March 1, 2017 at 3:02 pm #1390907
Adrian TParticipantThis reply has been marked as private.March 1, 2017 at 10:30 pm #1391391
RupokMemberHey there,
Thanks for writing in! Let’s use this instead :
// Social Output // ============================================================================= 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', '' ); $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"></i></a>'; endif; if ( $twitter ) : $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-icon-twitter-square"></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"></i></a>'; endif; if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square"></i></a>'; endif; if ( $xing ) : $output .= '<a href="' . $xing . '" class="xing" title="XING" target="_blank"><i class="x-icon-xing-square"></i></a>'; endif; if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-icon-foursquare"></i></a>'; endif; if ( $youtube ) : $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-icon-youtube-square"></i></a>'; endif; if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square"></i></a>'; endif; if ( $instagram ) : $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-icon-instagram"></i></a>'; endif; if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square"></i></a>'; endif; if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-icon-dribbble"></i></a>'; endif; if ( $flickr ) : $output .= '<a href="' . $flickr . '" class="flickr" title="Flickr" target="_blank"><i class="x-icon-flickr"></i></a>'; endif; if ( $behance ) : $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-icon-behance-square"></i></a>'; endif; if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square"></i></a>'; endif; if ( $soundcloud ) : $output .= '<a href="' . $soundcloud . '" class="soundcloud" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud"></i></a>'; endif; if ( $rss ) : $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square"></i></a>'; endif; // Add your trip advisor link here $output .= '<a href="http://your-trip-advisor-link/" class="trip-advisor" title="Trip Advisor" target="_blank"><i class="x-icon-tripadvisor" data-x-icon=""></i></a></a>'; $output .= '</div>'; echo $output; } endif;Make sure to change the link to your Trip advisor profile.
Cheers!
March 1, 2017 at 10:41 pm #1391399
Adrian TParticipantI tried but it failed.
Only my old social media footer icons are still showing.
PS: I also tried adding it manually on another page but I can only see it when im in Cornerstone.
March 2, 2017 at 1:37 am #1391517
RupokMemberHi there,
If you are seeing within Cornerstone then it’s actually working. Perhaps you are not seeing it due to cache. The above code is a working example and should work fine if you add properly.
Thanks!
March 2, 2017 at 10:14 am #1392040
Adrian TParticipantSo if its cache how can I fix it?
Thanks!
March 2, 2017 at 12:13 pm #1392168
JadeModeratorHi Adrian,
We could check this further for you but kindly provide us with your FTP details so that we could check the code you have added in the child theme.
Thank you.
March 2, 2017 at 12:15 pm #1392169
Adrian TParticipantThis reply has been marked as private.March 2, 2017 at 7:52 pm #1392779
Rue NelModeratorHello There,
Thanks for providing the information. It turns out that you did not install a child theme. Because 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.
I went ahead and installed a child theme. I also transferred the given custom social icon code in your child theme’s functions.php file. The Trip Advisor icon is now showing in your footer.
Please check your site now.
March 2, 2017 at 8:04 pm #1392796
Adrian TParticipantThank you so much ! Looks perfect.
March 2, 2017 at 10:33 pm #1392884
Prasant RaiModeratorYou are most welcome. 🙂
March 3, 2017 at 11:40 am #1393569
Cindy HParticipantHi guys –
I am trying to solve the same problem. I installed the code above in my child theme’s functions.php and I see an icon on the top social bar that links to TripAdvisor, however it is a plane. Since FA offers the actual TA icon, is it possible to use that one instead? And can you please advise how to get the background to change to TA green when I hover over it, as the other social icons can do with their company branded colors?Also, my only other social icon is Facebook, and adding the TA code seems to have done something to the FB icon, as it no longer displays properly. The background circle is there, and it changes to blue when I hover over it, but the white F is no longer visible.
My URL is http://positanoph.com
Thanks so much –
CindyMarch 3, 2017 at 11:42 am #1393573
Cindy HParticipantOne more thing – the TA icon is not in line with the other social icon. Is there a quick CSS adjustment you can give me for that?
Thanks!March 3, 2017 at 1:25 pm #1393666
Cindy HParticipantI’ve almost got it, but not quite. The following CSS in the child theme’s style.css gets the FB icon back and uses the real TA icon, and also fixes the alignment problem. But the hovering background color part isn’t working.
.x-icon-tripadvisor:before { content: "\f262"; } .x-social-global a:hover.tripadvisor { background-color: #589442; } .x-icon-facebook-square:before { content: "\f082"; }March 3, 2017 at 10:51 pm #1394099
ChristopherModeratorHi there,
Please update your code to :
a.trip-advisor:hover { background-color: #589442; }Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1390892 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
