Tagged: x
-
AuthorPosts
-
May 6, 2016 at 7:31 am #978523
ldenapoliParticipantHey X help,
I need some help getting the logo to come up under the menu bar and stay static. I have already found the workflow on the forum to do each independently with the child theme and tried to hack the two methods together unsuccessfully. I got close but the menu bar color is coming up in the wrong place and not really working. Can you please take a look to see where I went wrong. Thanks so much!!!
<?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-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><div class=”x-logobar”>
<div class=”x-logobar-inner”>
<div class=”x-container max width”>
<?php x_get_view( ‘global’, ‘_brand’ ); ?>
</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’, ‘_nav’, ‘primary’ ); ?>
<?php x_get_view( ‘global’, ‘_brand’ ); ?>
</div>
</div>
</div>
</div><?php endif; ?>
May 6, 2016 at 12:07 pm #978819
RahulModeratorHi,
Can you please share the link to your website?
Thanks
May 7, 2016 at 7:27 am #980086
ldenapoliParticipantMay 7, 2016 at 9:44 am #980192
ThaiModeratorHi There,
Please replace your code with this:
<?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-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> <div class="x-logobar"> <div class="x-logobar-inner"> <div class="x-container max width"> <?php x_get_view( 'global', '_brand' ); ?> </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_get_view( 'global', '_nav', 'primary' ); ?> </div> </div> </div> </div> <?php endif; ?>If it doesn’t work, please provide us with your FTP account so we can take a closer look.
Thank you.
May 7, 2016 at 6:54 pm #980440
ldenapoliParticipantThis reply has been marked as private.May 8, 2016 at 1:38 am #980759
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> CSS :
.x-logobar.x-navbar-fixed-top { position: fixed; right: 0; left: 0; top: 30px; }Please add following code in Customize -> Custom -> JavaScript :
jQuery(document).ready(function($){ $(window).scroll(function(){ if ($(this).scrollTop() > 10) { $('.x-logobar').addClass("x-navbar-fixed-top"); } else { $('.x-logobar').removeClass("x-navbar-fixed-top"); } }); });Hope it helps.
May 9, 2016 at 6:56 pm #983185
ldenapoliParticipantThanks, that work OK but its a little jumpy and after seeing it in action my wife is not loving it
May 10, 2016 at 12:54 am #983570
RupokMemberHi there,
Thanks for updating. If you want this to be more smoother then you need some more custom development and need to use jQuery UI tool. Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-978523 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
