-
AuthorPosts
-
August 13, 2014 at 8:15 am #83687
Ben SParticipantI have added the following code to add a email icon next to my social icons in my topbar, but it makes all the social icons disappear besides the email icon. Can you help me get my social icons back. I do have the URLS entered in the customizer. The site is http://restoration.lastingimprovements.com/
<?php
// =============================================================================
// FUNCTIONS.PHP
// —————————————————————————–
// Overwrite or add your own custom functions to X in this file.
// =============================================================================if ( ! function_exists( ‘x_social_global’ ) ) :
function x_social_global( $position = ‘topbar’ ) {$facebook = get_theme_mod( ‘x_social_facebook’ );
$twitter = get_theme_mod( ‘x_social_twitter’ );
$google_plus = get_theme_mod( ‘x_social_googleplus’ );
$linkedin = get_theme_mod( ‘x_social_linkedin’ );
$foursquare = get_theme_mod( ‘x_social_foursquare’ );
$youtube = get_theme_mod( ‘x_social_youtube’ );
$vimeo = get_theme_mod( ‘x_social_vimeo’ );
$instagram = get_theme_mod( ‘x_social_instagram’ );
$pinterest = get_theme_mod( ‘x_social_pinterest’ );
$dribbble = get_theme_mod( ‘x_social_dribbble’ );
$behance = get_theme_mod( ‘x_social_behance’ );
$rss = get_theme_mod( ‘x_social_rss’ );
$envelope = get_theme_mod( ‘x_icon_envelope’ );if ( $position == ‘topbar’ ) {
$tooltip = ‘data-toggle=”tooltip” data-placement=”bottom” data-trigger=”hover”‘;
} else {
$tooltip = ‘data-toggle=”tooltip” data-placement=”top” data-trigger=”hover”‘;
}$output = ‘<div class=”x-social-global”>’;
if ( $facebook ) : $output .= ‘<i class=”x-social-facebook”></i>‘; endif;
if ( $twitter ) : $output .= ‘<i class=”x-social-twitter”></i>‘; endif;
if ( $google_plus ) : $output .= ‘<i class=”x-social-google-plus”></i>‘; endif;
if ( $linkedin ) : $output .= ‘<i class=”x-social-linkedin”></i>‘; endif;
if ( $foursquare ) : $output .= ‘<i class=”x-social-foursquare”></i>‘; endif;
if ( $youtube ) : $output .= ‘<i class=”x-social-youtube”></i>‘; endif;
if ( $vimeo ) : $output .= ‘<i class=”x-social-vimeo”></i>‘; endif;
if ( $instagram ) : $output .= ‘<i class=”x-social-instagram”></i>‘; endif;
if ( $pinterest ) : $output .= ‘<i class=”x-social-pinterest”></i>‘; endif;
if ( $dribbble ) : $output .= ‘<i class=”x-social-dribbble”></i>‘; endif;
if ( $behance ) : $output .= ‘<i class=”x-social-behance”></i>‘; endif;
if ( $rss ) : $output .= ‘<i class=”x-social-rss”></i>‘; endif;
$output .= ‘<i class=”x-icon-envelope”style=”font-size:28px;”></i>‘;$output .= ‘</div>’;
echo $output;
}
endif;August 13, 2014 at 8:35 am #83695
Kosher KMemberHi There,
The code structure for
x_social_globalfunction has been change since the last update, you can see it inx/framework/functions/global/social.phpPlease change your code to this
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', '' ); $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', '' ); $behance = x_get_option( 'x_social_behance', '' ); $tumblr = x_get_option( 'x_social_tumblr', '' ); $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-social-facebook"></i></a>'; endif; if ( $twitter ) : $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-social-twitter"></i></a>'; endif; if ( $google_plus ) : $output .= '<a href="' . $google_plus . '" class="google-plus" title="Google+" target="_blank"><i class="x-social-google-plus"></i></a>'; endif; if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-social-linkedin"></i></a>'; endif; if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-social-foursquare"></i></a>'; endif; if ( $youtube ) : $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-social-youtube"></i></a>'; endif; if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-social-vimeo"></i></a>'; endif; if ( $instagram ) : $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-social-instagram"></i></a>'; endif; if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-social-pinterest"></i></a>'; endif; if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-social-dribbble"></i></a>'; endif; if ( $behance ) : $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-social-behance"></i></a>'; endif; if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-social-tumblr"></i></a>'; endif; if ( $rss ) : $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-social-rss"></i></a>'; endif; $output .= '<i class="x-icon-envelope" style="font-size:28px;"></i>'; $output .= '</div>'; echo $output; } endif;Hope that helps.
Cheers
December 21, 2014 at 6:23 am #168326
Brittany HParticipantHi! I was trying to fix my social share icons (reddit & email icons were not appearing) so I followed the instructions above. I changed the code to what you recommended above and I now receive a warning when I try to logon to my wordpress site…
“Fatal error: Call to undefined function x_get_option() in /home/brihow14/modernwayfarers.com/wp-content/themes/x/framework/functions/global/social.php on line 85”
Any ideas??
Thank you!
December 22, 2014 at 3:53 am #168757
RubinKeymasterHey There,
Can you tell me what version of X you’re using? It looks like you’re using an old version so I would recommend updating the theme and all plugins to the latest version which use newer functions and increase also the performance. get_option was added to our theme some time ago so only if you’re using a theme version that is older than some month this error could be caused from this. Let me know if that resolves the issue.
December 22, 2014 at 7:12 am #168867
Brittany HParticipantI’m definitely using an older version. It was set up this summer. Not sure how to tell which version though. I have a child theme set up so hopefully this update will go smoothly! Fingers crossed!
December 22, 2014 at 7:16 am #168870
Brittany HParticipantWill I loose all of the custom css I’ve put in my customizer ‘custom’ settings by updating the theme?
December 22, 2014 at 10:05 am #168963
ChristopherModeratorHi there,
No,you won’t loose CSS inside Customizer,if you have modified files outside the child theme ,they will be overwritten,otherwise all files inside child theme are safe.
Please update your theme and X shortocde referring to theme.co/x/member/kb/updating-your-theme-and-plugins/.Thank you.
December 22, 2014 at 10:06 am #168964
ChristopherModeratorHi there,
No,you won’t loose CSS inside Customizer,if you have modified files outside the child theme ,they will be overwritten,otherwise all files inside child theme are safe.
Please update your theme and X shortocde referring to theme.co/x/member/kb/updating-your-theme-and-plugins/.Thank you.
December 23, 2014 at 1:38 am #169593
Brittany HParticipantThank you! Everything is solved and the site is working fine after the update. I appreciate the wonderful support!
December 23, 2014 at 6:05 am #169759
ChristopherModeratorYou’re welcome 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-83687 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
