Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1329278
    brandonbey12
    Participant
    #1329601
    Friech
    Moderator

    Hi 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!

    #1329825
    brandonbey12
    Participant

    the 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

    #1329839
    brandonbey12
    Participant

    I fixed number 2. I had 0px selected

    #1329843
    Christopher
    Moderator

    Hi 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.

    #1329857
    brandonbey12
    Participant

    where is framework/views/global

    #1329859
    brandonbey12
    Participant

    found it

    #1329864
    brandonbey12
    Participant

    that made the logo area disappear entirely?

    #1329870
    brandonbey12
    Participant

    I have logo area but it still goes away when scrolling

    #1329879
    Christopher
    Moderator

    Hi 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.

    #1329880
    brandonbey12
    Participant

    hmmm, 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!

    #1330126
    Rad
    Moderator

    Hi 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.

    #1330189
    brandonbey12
    Participant

    I see no change

    #1330343
    brandonbey12
    Participant

    Hey there! It worked. I was putting it in the CSS in customizer. When I tried it in the cornerstone CSS it worked.

    Thank you

    #1330527
    Christopher
    Moderator

    You’re welcome.

  • <script> jQuery(function($){ $("#no-reply-1329278 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>