Tagged: x
-
AuthorPosts
-
January 13, 2017 at 5:25 pm #1329278
brandonbey12ParticipantJanuary 14, 2017 at 12:20 am #1329601
FriechModeratorHi There,
Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
Cheers!
January 14, 2017 at 6:16 am #1329825
brandonbey12Participantthe link is soberlifefoundation.com.
when I scroll the logo area disappears and only menu bar stays.
2. a new problem, my navigation is gone on tablet and mobile.
3. I want to place a phone number in the header but do not want to add topbar
January 14, 2017 at 6:33 am #1329839
brandonbey12ParticipantI fixed number 2. I had 0px selected
January 14, 2017 at 6:41 am #1329843
ChristopherModeratorHi there,
Copy _brand.php from framework/views/global and put it in the same path inside child theme, replace existing code with following :
<?php // ============================================================================= // VIEWS/GLOBAL/_BRAND.PHP // ----------------------------------------------------------------------------- // Outputs the brand. // ============================================================================= $site_name = get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description' ); $logo = x_make_protocol_relative( x_get_option( 'x_logo' ) ); $site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">'; ?> <?php echo '<h1 class="visually-hidden">' . $site_name . '</h1>'; ?> <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>"> <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?> </a> <span class="custom-header">12345</span>Please add following code in Customize -> Custom -> Global CSS :
.custom-header{ float:right; display:inline-block; }Hope it helps.
January 14, 2017 at 6:54 am #1329857
brandonbey12Participantwhere is framework/views/global
January 14, 2017 at 6:57 am #1329859
brandonbey12Participantfound it
January 14, 2017 at 7:05 am #1329864
brandonbey12Participantthat made the logo area disappear entirely?
January 14, 2017 at 7:11 am #1329870
brandonbey12ParticipantI have logo area but it still goes away when scrolling
January 14, 2017 at 7:22 am #1329879
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> Global CSS :
.x-navbar.x-navbar-fixed-top { top: 127px; } .x-logobar.x-navbar-fixed-top { position: fixed; top: 0; left: 0; right: 0; }add following code in Customize -> Custom -> Global JavaScript :
jQuery(document).ready(function($){ $(window).scroll(function(){ if ($(this).scrollTop() > 0) { $('.x-logobar').addClass("x-navbar-fixed-top"); } else { $('.x-logobar').removeClass("x-navbar-fixed-top"); } }); });Additionally, for future reference we kindly ask that our users not bump their threads as stated in our support policy. Since we answer questions from oldest to newest and bumping a thread makes it appear as brand new, this will only serve to lengthen our response time. Replies in the forum can take up to 24 hours during the week, but oftentimes we are able to get to questions much quicker than that. We request that our users wait patiently while we work our way through the forum as we can assure you that all questions will be addressed as soon as possible.
Hope that helps.
January 14, 2017 at 7:28 am #1329880
brandonbey12Participanthmmm, So sorry to have offended you? Not sure what you mean by bumping my head?
The code worked to keep the header but I want the Navigation bar to stay put as well
Look forward to your reply whenever you are able!
January 14, 2017 at 2:50 pm #1330126
RadModeratorHi there,
Sorry for the confusion, it was bumping the thread and not the head 🙂 . It’s about posting consecutive messages.
Please remove this CSS,
.x-navbar.x-navbar-fixed-top { top: 127px; } .x-logobar.x-navbar-fixed-top { position: fixed; top: 0; left: 0; right: 0; }And change your javascript to this
jQuery(document).ready(function($){ $(window).scroll(function(){ $('.x-navbar').removeClass("x-navbar-fixed-top"); if ($(this).scrollTop() > 0) { $('.masthead').addClass("x-navbar-fixed-top"); } else { $('.masthead').removeClass("x-navbar-fixed-top"); } }); });Hope this helps.
January 14, 2017 at 4:20 pm #1330189
brandonbey12ParticipantI see no change
January 14, 2017 at 7:28 pm #1330343
brandonbey12ParticipantHey there! It worked. I was putting it in the CSS in customizer. When I tried it in the cornerstone CSS it worked.
Thank you
January 15, 2017 at 12:35 am #1330527
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1329278 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
