Skip to content

Split Menu

At first register a new menu location:

function register_user_menu() {
	register_nav_menu('main_menu_right',__( 'Right Menu', 'total' )." (".__( 'Right', 'total' ).")");
}
add_action( 'init', 'register_user_menu' );

Then in your child theme directory add a new directory „partials/header“ with a „header-menu.php“ file in it:

After the closing </nav> add this:

<!-- enym start -->
<?php
$menu_location_right = "main_menu_right";
if ( has_nav_menu( $menu_location_right )) :
  $menu_args_right = apply_filters( 'wpex_header_menu_args', array(
    'theme_location' => $menu_location_right,
    'menu_class'     => wpex_header_menu_ul_classes(),
    'container'      => false,
    'fallback_cb'    => false,
    'link_before'    => '<span class="link-inner">',
    'link_after'     => '</span>',
    'walker'         => new WPEX_Dropdown_Walker_Nav_Menu(),
  ) );
?>

	<nav id="site-navigation-right" class="<?php echo wpex_header_menu_classes( 'inner' ); ?>"<?php wpex_schema_markup( 'site_navigation' ); ?><?php wpex_aria_landmark( 'site_navigation' ); ?> aria-label="<?php echo wpex_get_mod( 'main_menu_aria_label', esc_attr_x( 'Main menu', 'aria-label', 'total' ) ); ?>">
        <?php
wp_nav_menu( $menu_args_right );
        ?>
	</nav>
                       
<?php endif; ?>  
<!-- enym end -->
An den Anfang scrollen