Tagged: x
-
AuthorPosts
-
January 15, 2017 at 1:45 am #1330563
[email protected]ParticipantI am trying to include a snapchat social icon, now I understand X does not have the facility to add this via Custommizer, but I do notice X has [x_icon type=”snapchat”] and it allows me to display this icon anywhere i can put some text.
Help me add this to the footer social links whether by editing Custom CSS, JS or even adding a function in PHP.
I have read some archived replies where your suggestions have helped other people, but the same is not working for me.
Some links I read:-
https://community.theme.co/forums/topic/snapchat-icon/
https://community.theme.co/forums/topic/snapchat-icon/#post-387065
https://community.theme.co/forums/topic/add-new-social-media-icons/page/2/
https://community.theme.co/forums/topic/how-can-we-create-snapchat-social-icon-within-the-x-theme/Please help, I have removed anything I put in using above links to start from scratch.
January 15, 2017 at 2:06 am #1330582
[email protected]ParticipantThis reply has been marked as private.January 15, 2017 at 2:07 am #1330583
[email protected]Participantdata-x-icon taken from http://fontawesome.io/cheatsheet/ for “fa-snapchat-ghost []”
January 15, 2017 at 2:56 am #1330621
[email protected]ParticipantOk I finally got it to work like the following….let me know if there is a more elegant solution…
// replace in /wp-content/themes/x/framework/functions/global/social.php
// 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’, ” );
$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 .= ‘<i class=”x-icon-facebook-square” data-x-icon=””></i>‘; endif;
if ( $twitter ) : $output .= ‘<i class=”x-icon-twitter-square” data-x-icon=””></i>‘; endif;
if ( $google_plus ) : $output .= ‘<i class=”x-icon-google-plus-square” data-x-icon=””></i>‘; endif;
if ( $linkedin ) : $output .= ‘<i class=”x-icon-linkedin-square” data-x-icon=””></i>‘; endif;
if ( $xing ) : $output .= ‘<i class=”x-icon-xing-square” data-x-icon=””></i>‘; endif;
if ( $foursquare ) : $output .= ‘<i class=”x-icon-foursquare” data-x-icon=””></i>‘; endif;
if ( $youtube ) : $output .= ‘<i class=”x-icon-youtube-square” data-x-icon=””></i>‘; endif;
if ( $vimeo ) : $output .= ‘<i class=”x-icon-vimeo-square” data-x-icon=””></i>‘; endif;
if ( $instagram ) : $output .= ‘<i class=”x-icon-instagram” data-x-icon=””></i>‘; endif;// Snapchat
$snapchat = ‘http://www.snapchatlink.com/’;
if ( $snapchat ) : $output .= ‘<i class=”x-icon-snapchat-ghost” data-x-icon=””></i>‘; endif;if ( $pinterest ) : $output .= ‘<i class=”x-icon-pinterest-square” data-x-icon=””></i>‘; endif;
if ( $dribbble ) : $output .= ‘<i class=”x-icon-dribbble” data-x-icon=””></i>‘; endif;
if ( $flickr ) : $output .= ‘<i class=”x-icon-flickr” data-x-icon=””></i>‘; endif;
if ( $behance ) : $output .= ‘<i class=”x-icon-behance-square” data-x-icon=””></i>‘; endif;
if ( $tumblr ) : $output .= ‘<i class=”x-icon-tumblr-square” data-x-icon=””></i>‘; endif;
if ( $whatsapp ) : $output .= ‘<i class=”x-icon-whatsapp” data-x-icon=””></i>‘; endif;
if ( $soundcloud ) : $output .= ‘<i class=”x-icon-soundcloud” data-x-icon=””></i>‘; endif;
if ( $rss ) : $output .= ‘<i class=”x-icon-rss-square” data-x-icon=””></i>‘; endif;$output .= ‘</div>’;
echo $output;
}
endif;
// =============================================================================January 15, 2017 at 3:12 am #1330634
ChristopherModeratorHi there,
Please add following code in child theme’s functions.php :
// Social Output // ============================================================================= <?php 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 . '" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon=""></i></a>'; endif; if ( $twitter ) : $output .= '<a href="' . $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 . '" title="Google+" target="_blank"><i class="x-icon-google-plus-square" data-x-icon=""></i></a>'; endif; if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon=""></i></a>'; endif; if ( $xing ) : $output .= '<a href="' . $xing . '" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon=""></i></a>'; endif; if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon=""></i></a>'; endif; if ( $youtube ) : $output .= '<a href="' . $youtube . '" title="YouTube" target="_blank"><i class="x-icon-youtube-square" data-x-icon=""></i></a>'; endif; if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon=""></i></a>'; endif; if ( $instagram ) : $output .= '<a href="' . $instagram . '" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon=""></i></a>'; endif; // Snapchat $snapchat = 'http://www.gaflajewellery.com/'; if ( $snapchat ) : $output .= '<a href="' . $snapchat . '" title="snapchat" target="_blank"><i class="x-icon-snapchat-ghost" data-x-icon=""></i></a>'; endif; if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon=""></i></a>'; endif; if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon=""></i></a>'; endif; if ( $flickr ) : $output .= '<a href="' . $flickr . '" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon=""></i></a>'; endif; if ( $behance ) : $output .= '<a href="' . $behance . '" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon=""></i></a>'; endif; if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon=""></i></a>'; endif; if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon=""></i></a>'; endif; if ( $soundcloud ) : $output .= '<a href="' . $soundcloud . '" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon=""></i></a>'; endif; if ( $rss ) : $output .= '<a href="' . $rss . '" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon=""></i></a>'; endif; $output .= '<a href="snapchat_ghost_URL"><i class="x-icon-snapchat-ghost" data-x-icon=""></i></a>'; $output .= '</div>'; echo $output; } endif; // =============================================================================Replace snapchat_ghost_URL with your profile URL.
Hope it helps.
January 15, 2017 at 4:21 am #1330654
[email protected]ParticipantThe same code in functions.php has no effect, but works fine when replaced in social.php, do you know why ?
January 15, 2017 at 4:35 am #1330663
ChristianModeratorTry this
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 . '" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon=""></i></a>'; endif; if ( $twitter ) : $output .= '<a href="' . $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 . '" title="Google+" target="_blank"><i class="x-icon-google-plus-square" data-x-icon=""></i></a>'; endif; if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon=""></i></a>'; endif; if ( $xing ) : $output .= '<a href="' . $xing . '" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon=""></i></a>'; endif; if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon=""></i></a>'; endif; if ( $youtube ) : $output .= '<a href="' . $youtube . '" title="YouTube" target="_blank"><i class="x-icon-youtube-square" data-x-icon=""></i></a>'; endif; if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon=""></i></a>'; endif; if ( $instagram ) : $output .= '<a href="' . $instagram . '" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon=""></i></a>'; endif; // Snapchat $snapchat = 'http://www.gaflajewellery.com/'; if ( $snapchat ) : $output .= '<a href="' . $snapchat . '" title="snapchat" target="_blank"><i class="x-icon-snapchat-ghost" data-x-icon=""></i></a>'; endif; if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon=""></i></a>'; endif; if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon=""></i></a>'; endif; if ( $flickr ) : $output .= '<a href="' . $flickr . '" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon=""></i></a>'; endif; if ( $behance ) : $output .= '<a href="' . $behance . '" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon=""></i></a>'; endif; if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon=""></i></a>'; endif; if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon=""></i></a>'; endif; if ( $soundcloud ) : $output .= '<a href="' . $soundcloud . '" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon=""></i></a>'; endif; if ( $rss ) : $output .= '<a href="' . $rss . '" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon=""></i></a>'; endif; $output .= '<a href="snapchat_ghost_URL"><i class="x-icon-snapchat-ghost" data-x-icon=""></i></a>'; $output .= '</div>'; echo $output; }Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1330563 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
