Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #897519
    octofunk
    Participant

    Hello,

    I’m trying to build an ecommerce site with ethos and i have a few questions.
    I’m trying to create a second menu that it will be simple words actually and use the regular one only for woocommerce categories. The new menu is only for home,about us,login,cart.
    I went with the stack layout and put the logo that now appears in the new logobar in the left with float:left;

    First i would like to make this logobar fixed, like the menu above it, in the top of the screen if it’s possible and second i would like to ask if there is any way to put text with links inside that logobar.

    Thank you in advance.

    #898139
    Rupok
    Member

    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.

    #898328
    octofunk
    Participant
    This reply has been marked as private.
    #898330
    octofunk
    Participant
    This reply has been marked as private.
    #898891
    Rupok
    Member

    Hi there,

    Thanks for writing back. You didn’t provide URL so we can’t check this. Kindly give us the URL of your site.

    Cheers!

    #898972
    octofunk
    Participant
    This reply has been marked as private.
    #899971
    Christopher
    Moderator

    Hi there,

    Please copy _navbar.php from framework/views/global and put it in the same path inside child theme, replace existing code with following :

    <?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' ); ?>
               <?php if ( is_home() || is_cart() || is_page('37') || is_account_page() )
            echo '<a href="">Menu item 1</a>|<a href="">Menu item 1</a>'
          ?> 
          </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_get_view( 'global', '_nav', 'primary' ); ?>
            </div>
          </div>
        </div>
      </div>
    
    <?php endif; ?>

    Please add following code in Customize -> Custom -> CSS :

    .x-navbar .x-nav>li.x-menu-item-woocommerce>a .x-cart.inline.inner-outer {
        border-right: 0.25em solid;
    }

    Hope it helps.

    #901634
    octofunk
    Participant

    Awesome.Exactly what i was looking for. Thank you very much!

    One more fast question. There is anyway to make this logobar to be fixed top on the screen?

    #902556
    Thai
    Moderator

    Hi There,

    #1] Please add the following code under Customizer > Custom > Global Javascript:

    jQuery(document).ready(function($){
    	$(window).scroll(function(){
    		if ($(this).scrollTop() > 10) {
    			$('.x-logobar').addClass('x-logobar-fixed');
    		} else {
    			$('.x-logobar').removeClass('x-logobar-fixed');
    		}
    	});
    });

    #2] Please add the following CSS under Customizer > Custom > Global CSS:

    .x-logobar-fixed {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }
    .admin-bar .x-logobar-fixed {
        top: 32px;
    }
    .x-navbar-fixed-top {
        top: 65px;
    }
    .admin-bar .x-navbar-fixed-top {
        top: 97px;
    }

    Hope it helps 🙂

    #903677
    octofunk
    Participant

    Thank you very much!

    #904477
    Joao
    Moderator

    You’re welcome!

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