Globe (YIT)

Globe causes major residual styling and breaks the menu, so we need to use Manual Integration for this theme.

Manual Integration

The theme’s menu is found in xglobe/theme/templates/header/navigation.php

Remember to always make changes in a child theme. To override a template in a child theme, copy it to the same directory path within the child theme.

You’ll see the theme menu at the top of the file:

<!-- START NAVIGATION -->
<div id="nav" class="nav header-nav <?php if( ! wp_is_mobile() ) echo 'section_fullwidth' ?>">
<div class="navigation-container container">
    <?php
    include_once( YIT_THEME_ASSETS_PATH . '/lib/Walker_Nav_Menu_Div.php' );
    $nav_args = array(
        'theme_location' => 'nav',
        'container' => 'none',
        'menu_class' => 'level-1 clearfix',
        'depth' => apply_filters( 'yit_main_nav_depth', 3 ),
    );

    if ( has_nav_menu( 'nav' ) )
        $nav_args['walker'] = new YIT_Walker_Nav_Menu_Div();

    wp_nav_menu( $nav_args );

    // searchform
    if ( 'yes' == yit_get_option('header-show-search') ) {
        yit_get_template( 'header/header-search.php' );
    }

    ?>
</div>
</div>
<!-- END NAVIGATION -->

We’ll conditionally replace this with UberMenu:

<?php if( function_exists( 'ubermenu' ) ): ?>
    <?php ubermenu( 'main' , array( 'theme_location' => 'nav' ) ); ?>
<?php else: ?>
    <!-- START NAVIGATION -->
    <div id="nav" class="nav header-nav <?php if( ! wp_is_mobile() ) echo 'section_fullwidth' ?>">
    <div class="navigation-container container">
        <?php
        include_once( YIT_THEME_ASSETS_PATH . '/lib/Walker_Nav_Menu_Div.php' );
        $nav_args = array(
            'theme_location' => 'nav',
            'container' => 'none',
            'menu_class' => 'level-1 clearfix',
            'depth' => apply_filters( 'yit_main_nav_depth', 3 ),
        );

        if ( has_nav_menu( 'nav' ) )
            $nav_args['walker'] = new YIT_Walker_Nav_Menu_Div();

        wp_nav_menu( $nav_args );

        // searchform
        if ( 'yes' == yit_get_option('header-show-search') ) {
            yit_get_template( 'header/header-search.php' );
        }

        ?>
    </div>
    </div>
    <!-- END NAVIGATION -->
<?php endif; ?>

Mobile Menu

To use UberMenu’s mobile menu only, don’t assign a menu to the theme’s Mobile Navigation theme location so that the theme won’t print its own menu.

If the mobile toggle still appears, you can add this CSS to hide it:

#mobile-menu-trigger{
    display:none !important;
}

On this page