Fixed Logobar in Ethos

I found a few topics on a fixed logobar, but none of those work quite the way I want. This is the page I’ve been messing around with: https://madebypress.org/innovativefour

When I click the arrow in the lower left hand corner I jump to the logobar and navbar without the slider. That’s perfect, but when I scroll I loose the logobar but the navabr stays. Is there a way to fix the logobar so it stays locked to the top of the page like the navbar does?

Thanks,
Brad

Hi Brad,

To make your logobar stay fixed like your navbar kindly do the following.

  1. Add this in Theme Options > JS
jQuery(function($) {
   $(window).scroll(function() {
      if ( $(this).scrollTop() >= logobarOffset() ) {
           $('.x-logobar').addClass('x-logobar-fixed-top');
      } else {
           $('.x-logobar').removeClass('x-logobar-fixed-top');
      }

   });


  function logobarOffset() {
    return $('.x-logobar').offset().top - $('#wpadminbar').outerHeight();
  }
});
  1. Add this in Theme Options > CSS
@media (min-width:979px) {
.x-logobar-fixed-top {
    position: fixed;
    width: 100%;
    top: 0;
}

.x-navbar.x-navbar-fixed-top {
    top:159px;
}
}

Hope that helps.

Paul,

I would have never figured that out. Thank you so much!

Be well,
Brad

You’re welcome, Brad.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.