Tagged: x
-
AuthorPosts
-
December 13, 2016 at 1:55 pm #1291738
JW & Co.ParticipantGood afternoon,
Can you please tell me how to add three icons in between the picture and the word “Summary” on http://www.joshuaweatherstone.com?
I would like to add a phone, envelope, and linkedin icon in a row in this space: http://prnt.sc/dj1euk. Each will link off the site.
Thanks!
December 13, 2016 at 8:04 pm #1292194
FriechModeratorHi There,
Thanks for writing in! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.
On your child theme navigate to this directory: \x-child\framework\views\global\ there create a file named _navbar.php and paste the code below on it.
<?php // ============================================================================= // VIEWS/GLOBAL/_NAVBAR.PHP // ----------------------------------------------------------------------------- // Outputs the navbar. // ============================================================================= $navbar_position = x_get_navbar_positioning(); $logo_nav_layout = x_get_logo_navigation_layout(); $is_one_page_nav = x_is_one_page_navigation(); ?> <?php if ( ( $navbar_position == 'static-top' || $navbar_position == 'fixed-top' || $is_one_page_nav ) && $logo_nav_layout == 'stacked' ) : ?> <div class="x-logobar"> <div class="x-logobar-inner"> <div class="x-container max width"> <?php x_get_view( 'global', '_brand' ); ?> </div> </div> </div> <div class="x-navbar-wrap"> <div class="<?php x_navbar_class(); ?>"> <div class="x-navbar-inner"> <div class="x-container max width"> <?php x_get_view( 'global', '_nav', 'primary' ); ?> </div> </div> </div> </div> <?php else : ?> <div class="x-navbar-wrap"> <div class="<?php x_navbar_class(); ?>"> <div class="x-navbar-inner"> <div class="x-container max width"> <?php x_get_view( 'global', '_brand' ); ?> <?php x_social_global(); ?> <?php x_get_view( 'global', '_nav', 'primary' ); ?> </div> </div> </div> </div> <?php endif; ?>Add your social media profile URL on Customizer > Social.
Then add this under Custom > CSS in the Customizer to center the icons.
.x-navbar-wrap .x-social-global {text-align: center;} .x-navbar-wrap .x-social-global a {padding: 20px 10px 0;}Hope it helps, Cheers!
December 19, 2016 at 1:15 pm #1298532
JW & Co.ParticipantHello,
I finally got around to attempting the above, but it unfortunately did not work.
Thoughts?
December 19, 2016 at 3:21 pm #1298652
DarshanaModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
December 20, 2016 at 11:56 am #1299597
JW & Co.ParticipantThis reply has been marked as private.December 20, 2016 at 5:17 pm #1299868
FriechModeratorHi There,
I did go ahead and install the x-child theme on your site (
not the x-child-integrity-light you can delete that)Then I created the file _navbar.php I’m talking about above. You can see that on this directory: /public_html/wp-content/themes/x-child/framework/views/global/.
You can now add your social media profile URL on Customizer > Social.
Hope it helps, Cheers!
December 21, 2016 at 10:47 am #1300704
JW & Co.ParticipantHello,
Thanks so much for your help! I really appreciate it.
Is it possible to add a phone icon and an envelope icon to the left of it?
December 21, 2016 at 11:15 am #1300743
ThaiModeratorHi There,
Please add the following code under functions.php file locates in your child theme:
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' ); $github = x_get_option( 'x_social_github' ); $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">'; $output .= '<a href="tel:+123456789"><i class="x-icon x-icon-phone-square" data-x-icon="" aria-hidden="true"></i></a>'; $output .= '<a href="mailto:[email protected]"><i class="x-icon x-icon-envelope-o" data-x-icon="" aria-hidden="true"></i></a>'; if ( $facebook ) : $output .= '<a href="' . $facebook . '" class="facebook" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $twitter ) : $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-icon-twitter-square" data-x-icon="" aria-hidden="true"></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="" aria-hidden="true"></i></a>'; endif; if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $xing ) : $output .= '<a href="' . $xing . '" class="xing" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $youtube ) : $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-icon-youtube-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $instagram ) : $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $flickr ) : $output .= '<a href="' . $flickr . '" class="flickr" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $github ) : $output .= '<a href="' . $github . '" class="github" title="GitHub" target="_blank"><i class="x-icon-github-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $behance ) : $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" class="tumblr" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $soundcloud ) : $output .= '<a href="' . $soundcloud . '" class="soundcloud" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon="" aria-hidden="true"></i></a>'; endif; if ( $rss ) : $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon="" aria-hidden="true"></i></a>'; endif; $output .= '</div>'; echo $output; }You can replace the 123456789 number and [email protected] with your mobile number and email.
Hope it helps 🙂
December 21, 2016 at 2:41 pm #1300901
JW & Co.ParticipantHello,
I was able to add the code and insert my number and email where you suggested, but unfortunately the icons still aren’t showing up. 🙁
Josh
December 21, 2016 at 7:34 pm #1301190
LelyModeratorHello Josh,
When I visit the content of your child theme’s functions.php file, the code is not added. Did you remove it?
December 22, 2016 at 8:32 am #1301711
JW & Co.ParticipantI was able to get it to work.
Thanks for the follow-up.
December 22, 2016 at 9:38 am #1301791
Prasant RaiModeratorHappy to hear that. Feel free to ask us again. Have a great day! 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1291738 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
