Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1328593

    ak47marx
    Participant

    I have been trying to get it to work.

    1. I added in child theme /framework/views/global a file _topbar.php

    2. Then:

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_TOPBAR.PHP
    // -----------------------------------------------------------------------------
    // Includes topbar output.
    // =============================================================================
    
    ?>
    
    <?php if ( x_get_option( 'x_topbar_display', '' ) == '1' ) : ?>
    
      <div class="x-topbar">
        <div class="x-topbar-inner x-container max width">
          <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?>
          <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p>
          <?php endif; ?> 
          <?php
    
            wp_nav_menu( array(
                'menu'           => 'topbar-menu',
                'container'      => false,
                'menu_class'     => 'x-nav sf-menu',
                'container'       => 'div',
                'container_class' => 'top-menu',
            ) );
          ?>
          <?php x_social_global(); ?>
    	    </div>
      </div>
    
    <?php endif; ?>

    3. CSS

    
    .top-menu {
          float:left;
    }
    
    .top-menu ul {
         margin:0;
    }
    
    .top-menu li {
         display:inline-block;
    }
    .top-menu li a {
        padding:0 20px 0 0;
        line-height:46px;
    }
    
    

    4. And setup languages in WPML.

    Dropdown works great in main menu but not in topbar menu.

    Can anyone recommend a working solution?

    #1328657

    Paul R
    Moderator

    Hi,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1329635

    ak47marx
    Participant
    This reply has been marked as private.
    #1329691

    Christopher
    Moderator

    Hi there,

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

    .top-menu ul.sub-menu li {
        float: none;
        display: block;
    }
    .top-menu .menu-item-has-children:hover ul {
        display: block !important;
    }
    .top-menu ul.sub-menu {
        display: none;
        position: absolute;
    }

    Hope that helps.

    #1329841

    ak47marx
    Participant

    Perfect. You guys are amazing 🙂

    #1329849

    Christopher
    Moderator

    You’re welcome 🙂